Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- http://www.example.com
- http://example.com
- https://www.example.com
- RewriteEngine on
- RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
- RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
- RewriteCond %{HTTPS} !on
- RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
- RewriteCond %{HTTPS_HOST} ^www.(.*)$ [NC]
- RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
Add Comment
Please, Sign In to add comment