diff options
| author | Nathan Kinkade <nath@nkinka.de> | 2012-12-31 15:40:30 +0000 |
|---|---|---|
| committer | Nathan Kinkade <nath@nkinka.de> | 2012-12-31 15:40:30 +0000 |
| commit | 99036791cbd25bb3c3f133a788200c5918742f0f (patch) | |
| tree | a86e482f975511acb633fa4ea3aa1ad7ed00e6ab | |
| parent | 0b07d7392c2e269bbc6944cd9ab72900126b9f7c (diff) | |
Added an .htaccess file to handle new non .php extension URLs
| -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] + |
