Advertisement
Guest User

Untitled

a guest
Sep 29th, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. # activate URL rewriting
  2. RewriteEngine on
  3.  
  4. # Remove www
  5. RewriteCond %{HTTP_HOST} ^www.mywebsite.com$ [NC]
  6. RewriteRule ^(.*)$ http://mywebsite.com/$1 [R=301,L]
  7.  
  8. # do not rewrite links to the documentation, assets and public files
  9. RewriteCond $1 !^(index.php|public|images|robots.txt)
  10.  
  11. # do not rewrite for php files in the document root, robots.txt or the maintenance page
  12. RewriteCond $1 !^([^..]+.php|robots.txt|sitemap.xml)
  13.  
  14. # but rewrite everything else
  15. RewriteRule ^(.*)$ index.php?/$1 [L]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement