diff options
| -rw-r--r-- | .htaccess | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..0dcc4c5 --- /dev/null +++ b/.htaccess @@ -0,0 +1,11 @@ +RewriteEngine On + +# Redirect any requests with .php extensions to non .php URLs +RewriteRule ^/index\.php(.*) http://dev.nutridb.org/$1 [NE,L,R=301] +RewriteRule ^/(.*?)\.php(.*)$ http://dev.nutridb.org/$1$2 [NE,L,R=301] + +# Get rid of ugly .php extensions +RewriteCond %{REQUEST_URI} !^/$ +RewriteCond %{REQUEST_FILENAME} !-f +RewriteRule ^([^#?]*)(.*)$ /$1.php$2 [L,NE,PT] + |
