Created
April 14, 2010 06:33
-
-
Save drewjoh/365507 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CodeIgniter writing | |
RewriteCond $1 !^(index\.php|images|robots\.txt|css|user_files|subdomain1|subdomain2) | |
RewriteRule ^(.*)$ /index.php/$1 [L] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Redirect adding leading www to root domain if no subdomain is specified | |
RewriteCond %{HTTP_HOST} !^(subdomain1|subdomain2|www)\.example\.com$ [NC] | |
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Redirect deleting leading www to root domain if no specified subdomain is used | |
RewriteCond %{HTTP_HOST} !^(subdomain1|subdomain2)\.example\.com$ [NC] | |
RewriteCond %{HTTP_HOST} !^example\.com$ [NC] | |
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment