I would like to rewrite mypage.com/foo.php
as mypage.com/foo
. My rewrite changes the URL correctly, however the resultant page is a 404.
Here's what I've got so far:
# Setup conditions for internal rewrite of Foo
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite for TDS
RewriteRule ^foo/$ /foo.php [L,QSA]
# External redirect for Foo
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+foo\.php [NC]
RewriteRule ^ /foo/? [R=301,L]
What am I missing to make this work?