ディレクトリ インデックスを含む架空のアドレスを入力すると、そのアドレスが削除されます。問題は、アドレスに禁止されたサブディレクトリが含まれている場合です。それは禁じられるまで自分自身を減らします。それ自体を縮小するのではなく、ホームページにリダイレクトするにはどうすればよいですか?
Options -Indexes +FollowSymlinks -MultiViews
RewriteEngine on
DirectoryIndex index.htm index.html index.php
# REDIRECT www to non-wwww
# Set Canonical URL
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
# REMOVE Directory Index From URL
RewriteRule ^([a-zA-Z0-9_-]+/)?index\.(htm?|html?)$ /$1 [R=301,L]
# Custom Error Documents
ErrorDocument 404 /errors/404_notfound.htm