왜 이런 일이 발생하는지 모르지만 .html 확장자를 입력하지 않고 html 페이지에 액세스 할 수 있습니다. 이로 인해 중복 된 콘텐츠가 발생했습니다.내 .htaccess 파일에 대한 도움말
예 : 당신이
http://www.math-aids.com/Addition/Single_Digit.html
파일로 이동합니다
http://www.math-aids.com/Addition/Single_Digit
를 입력합니다.
내 모든 파일에서 이러한 현상이 발생합니다.
나는 그런 일이 일어나길 원하지 않습니다. 누군가가 파일에 대한 .html을 입력하지 않으면 404 오류 "파일을 찾을 수 없습니다"를 반환하려고합니다.
어떻게 해결할 수 있습니까? .htaccess 파일을 완전히 제거했지만 여전히 발생합니다.
내 .htaccess 파일입니다.
Options +FollowSymlinks
rewriteengine on
RewriteBase/
### re-direct IP address to www
### re-direct non-www to www
RewriteCond %{http_host} !^www.math-aids.com$ [nc]
RewriteRule ^(.*)$ http://www.math-aids.com/$1 [r=301,nc,L]
### re-direct index.html to root/###
RewriteEngine on
RewriteCond %{THE_REQUEST} ^.*\/index\.html?\ HTTP/
RewriteRule ^(.*)index\.html?$ "/$1" [R=301,L]
### re-direct index.php to root/###
RewriteCond %{THE_REQUEST} ^.*\/index\.php\ HTTP/
RewriteRule ^(.*)index\.php$ /$1 [R=301,L]
### re-direct default.html to root/###
RewriteCond %{THE_REQUEST} ^.*\/default\.html\ HTTP/
RewriteRule ^(.*)default\.html$ /$1 [R=301,L]
### re-direct home.html to root/###
RewriteCond %{THE_REQUEST} ^.*\/home\.html\ HTTP/
RewriteRule ^(.*)home\.html$ /$1 [R=301,L]
### re-direct errors to error page
ErrorDocument 404 /missing.html