Return to Snippet

Revision: 51834
at October 5, 2011 20:21 by kristapslazda


Initial Code
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

Initial URL


Initial Description


Initial Title
Joomla 301 redirect for all pages

Initial Tags
redirect, joomla

Initial Language
Regular Expression