「./index.html」と「./index」の両方で終わる要求されたアドレスを、「http://www. mydomain.com/index[.html]" から " http://www.mydomain.com/ " だけに。「index.html」の問題に関するヘルプを見つけましたが、「./index」のみのリクエストに対してソリューションを機能させるのに苦労しています。「./index」のみをコメントアウトして、次のコードを使用しています。
# MOD_REWRITE IN USE
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
# Redirect "index" page requests to either root or directory
# These first two lines work for "./index.html"...
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
RewriteRule ^index\.html$ http://%{HTTP_HOST}/ [R=301,L]
## These three lines don't work, last two are alternates of one another...
## RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index*\ HTTP/
## RewriteRule ^index*$ http://%{HTTP_HOST}/ [R=302,L]
## RewriteRule ^index*$ $1 [R=302,L]
# Hide .html extension - additional information
# To externally redirect /dir/foo.html to /dir/foo
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.html [NC]
RewriteRule ^ %1 [R=301,L]
# To internally forward /dir/foo to /dir/foo.html
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*?)/?$ $1.html [L]
(後者の部分は、前述のように「.html」の末尾を隠すためのものであり、不必要かもしれませんが、スクリプト全体をそのまま含めました。)Apacheサーバーのバージョンはわかりませんが、どんな支援も大歓迎です. ありがとう。