Advertisement
julong

.htaccess #redirect #non-www

Aug 14th, 2014
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. RewriteCond %{HTTP_HOST} !^www\.
  2. RewriteRule (.*) http://www.giant9.com/$1 [R=301,L]
  3.  
  4. or
  5.  
  6. RewriteCond %{HTTP_HOST} ^example\.com
  7. RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
  8. /*
  9. protected index.php
  10. */
  11. RewriteRule ^index.php$ http://www.example.com/$1 [R=301,L]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement