Posted By

kristapslazda on 10/05/11


Tagged

redirect 301 joomla


Versions (?)

Joomla 301 redirect for all pages


 / Published in: Regular Expression
 

  1. RewriteEngine On
  2.  
  3. ########## Begin - 301 Redirect
  4. #
  5. RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*(index|home)\.html?\ HTTP/
  6. RewriteRule ^(([^/]+/)*)(index|home)\.html?$ http://www.yoursite.com/$1 [R=301,L]
  7. #
  8. RewriteCond %{THE_REQUEST} !^POST
  9. RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.php\ HTTP/
  10. RewriteCond %{SERVER_PORT}>s ^(443>(s)|[0-9]+>s)$
  11. RewriteRule ^(([^/]+/)*)index\.php$ http%2://www.yoursite.com/$1 [R=301,L]
  12. #
  13. RewriteCond %{HTTP_HOST} ^(www\.yoursite\.com)?$
  14. RewriteRule (.*) http://www.yoursite.com/$1 [R=301,L]
  15. #
  16. ########## End - 301 Redirect

Report this snippet  

You need to login to post a comment.