Whats this do? ^([^.?]+)$ Or rather, how does it do it, and why wouldn't something simpler work, like ^(.+)$ ?
in:
RewriteEngine on
# Rewrite /foo/bar to /foo/bar.php
RewriteRule ^([^.?]+)$ %{REQUEST_URI}.php [L]
# Return 404 if original request is /foo/bar.php
RewriteCond %{THE_REQUEST} "^[^ ]* .*?\.php[? ].*$"
RewriteRule .* - [L,R=404]
from: <
(
Read more... )