-
-
Save RyoSugimoto/2cb54068873b847bd901 to your computer and use it in GitHub Desktop.
URLを「www」付きに統一する(またはその逆)。
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
# add www | |
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^mysite\.com [NC] | |
RewriteRule (.*) http://www.mysite.com/$1 [L,R=301] |
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
# remove www | |
RewriteEngine on | |
RewriteCond %{HTTP_HOST} !^mysite\.com [NC] | |
RewriteRule (.*) http://mysite.com/$1 [L,R=301] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment