/ Published in: Regular Expression
Expand |
Embed | Plain Text
RewriteEngine On ########## Begin - 301 Redirect # RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*(index|home)\.html?\ HTTP/ RewriteRule ^(([^/]+/)*)(index|home)\.html?$ http://www.yoursite.com/$1 [R=301,L] # RewriteCond %{THE_REQUEST} !^POST RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.php\ HTTP/ RewriteCond %{SERVER_PORT}>s ^(443>(s)|[0-9]+>s)$ RewriteRule ^(([^/]+/)*)index\.php$ http%2://www.yoursite.com/$1 [R=301,L] # RewriteCond %{HTTP_HOST} ^(www\.yoursite\.com)?$ RewriteRule (.*) http://www.yoursite.com/$1 [R=301,L] # ########## End - 301 Redirect
You need to login to post a comment.
