Last active
November 2, 2018 20:02
-
-
Save amityweb/3e1c7ca4a1dc1bea6e85836397606f5d to your computer and use it in GitHub Desktop.
My .htaccess redirects for with or without www and with HTTPS
This file contains hidden or 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 TO WWW and HTTPS | |
#RewriteEngine On | |
#RewriteCond %{HTTP_HOST} !^www.domainname.co.uk$ [OR] | |
#RewriteCond %{SERVER_PORT} 80 | |
#RewriteRule (.*) https://www.domainname.co.uk/$1 [R=301,L] | |
# REDIRECT TO WITHOUT WWW and HTTPS | |
#RewriteEngine On | |
#RewriteCond %{HTTP_HOST} !^domainname.co.uk$ [OR] | |
#RewriteCond %{SERVER_PORT} 80 | |
#RewriteRule (.*) https://domainname.co.uk/$1 [R=301,L] | |
# Remove comments # for the one you want to use |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment