Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # activate URL rewriting
- RewriteEngine on
- # Remove www
- RewriteCond %{HTTP_HOST} ^www.mywebsite.com$ [NC]
- RewriteRule ^(.*)$ http://mywebsite.com/$1 [R=301,L]
- # do not rewrite links to the documentation, assets and public files
- RewriteCond $1 !^(index.php|public|images|robots.txt)
- # do not rewrite for php files in the document root, robots.txt or the maintenance page
- RewriteCond $1 !^([^..]+.php|robots.txt|sitemap.xml)
- # but rewrite everything else
- RewriteRule ^(.*)$ index.php?/$1 [L]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement