From 99036791cbd25bb3c3f133a788200c5918742f0f Mon Sep 17 00:00:00 2001 From: Nathan Kinkade Date: Mon, 31 Dec 2012 15:40:30 +0000 Subject: Added an .htaccess file to handle new non .php extension URLs --- .htaccess | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .htaccess 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] + -- cgit v1.2.3