Created
February 26, 2014 22:48
-
-
Save susanBuck/9240424 to your computer and use it in GitHub Desktop.
Remove WWW from urls
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
RewriteEngine On | |
# Remove www from host (for both http and https) | |
RewriteCond %{HTTP_HOST} ^www\.(.+) | |
RewriteCond %{HTTPS}s/%1 ^(on(s)|offs)/(.+) | |
RewriteRule ^ http%2://%3%{REQUEST_URI} [L,R=301] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment