Home › Forums › Other › .htaccess rewrite url › Re: .htaccess rewrite url
June 25, 2013 at 2:06 pm
#140328
AWKM
Participant
AddType text/x-component .htc
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^GET (.*).php HTTP
RewriteRule (.*).php$ $1 [R=301]
RewriteRule (.*)/index$ $1/ [R=301]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} /$
RewriteRule (.*)/ $1 [R=301]
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) $1.php [L]