From 3b3d5d4ba0863a0431d8b102b3fd71543ab6ae17 Mon Sep 17 00:00:00 2001 From: initvector Date: Fri, 27 Feb 2015 18:56:54 -0500 Subject: [PATCH] Updating .htaccess to drop using p URL parameter --- .htaccess | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/.htaccess b/.htaccess index bb709bfa9e1..b3183696eed 100755 --- a/.htaccess +++ b/.htaccess @@ -1,12 +1,29 @@ # Original # If you modify this file then change the above line to: # Modified - RewriteEngine On - # Certain hosts may require the following line. - # If vanilla is in a subfolder then you need to specify it after the /. - # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum) - # RewriteBase / - RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L] - \ No newline at end of file + RewriteEngine On + # Certain hosts may require the following line. + # If vanilla is in a subfolder then you need to specify it after the /. + # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum) + # RewriteBase / + + # The basic rewrtie rule. + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^(.*)$ index.php/$1 [QSA,E=X_REWRITE:1,L] + + # Add the proper X_REWRITE server variable for rewritten requests. + RewriteCond %{ENV:REDIRECT_X_REWRITE} .+ + RewriteRule ^index\.php - [QSA,E=X_REWRITE:1,E=!REDIRECT_X_REWRITE,L] + + # 301 redirect urls that start with index.php + #RewriteCond %{REQUEST_METHOD} GET [NC] + #RewriteCond %{REQUEST_URI} ^(.*?)/index\.php(.*)$ + #RewriteRule ^index\.php /%1%2 [QSA,R,L] + + + + + Header set Cache-Control "max-age=315360000" + Header set Expires "31 December 2037 23:59:59 GMT" + +