http://www.mywebsite.com/~me/に Web サイトがあり、これらの動作が必要です。
http://www.mywebsite.com/~me/index.phpはhttp://www.mywebsite.com/~me/にリダイレクトする必要があります。
存在しないものを指す URL は、http://www.mywebsite.com/~me/404.phpにリダイレクトする必要があります。
解決策を探し回ったところ、次のスニペットが httpd.conf ファイルに含まれていることがわかりました。
Options +FollowSymLinks
DirectoryIndex index.php
RewriteEngine On
RewriteBase /~me/
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /~me/index\.php\ HTTP/
RewriteRule ^index\.php$ http://www.mywebsite.com/~me/ [R=301,L]
と
ErrorDocument 404 /~me/404.php
これらのスニペットは、動作 1 を適切に作成し、ほとんどの場合、動作 2 も作成します。ただし、 http://www.mywebsite.com/~me/index.php/fooが 404 ページにリダイレクトされる代わりに、 http://www.mywebsite.com/~me/index.phpにリダイレクトされます。
これらのスニペットを変更して、必要な動作を得るにはどうすればよいですか?