Created
October 6, 2017 20:21
-
-
Save headquarters/dd0f4720189d7a1e773a9088e45de884 to your computer and use it in GitHub Desktop.
Webfaction http->https and www redirect rules
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
| # webapps/michaelehead_redirect/.htaccess | |
| # michaelehead_redirect | |
| # | - http://michaelehead.com | |
| # | - http://www.michaelehead.com | |
| # This simply redirects all traffic to https://www (with or without www) to the app itself at “michaelehead”. | |
| # That app’s redirect rules then take care of the www portion. | |
| Options +FollowSymLinks | |
| RewriteEngine on | |
| RewriteRule ^(.*)$ https://www.michaelehead.com/$1 [R=301,L] | |
| # webapps/michaelehead/.htaccess | |
| # michaelehead | |
| # | - https://michaelehead.com | |
| # | - https://www.michaelehead.com | |
| # If a request comes in without the www at the beginning, it redirects to https://www as necessary. | |
| RewriteEngine on | |
| RewriteCond %{HTTP_HOST} ^michaelehead.com$ [NC] | |
| RewriteRule ^(.*)$ https://www.michaelehead.com/$1 [R=301,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment