Created
October 4, 2017 09:57
-
-
Save evemilano/bab1035c19defb5a197fbab7b72e2f50 to your computer and use it in GitHub Desktop.
Redirect m. to www (dedicated mobile to desktop)
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
# Esempio 1 | |
RewriteCond %{HTTP_HOST} ^m\.esempio\.com$ | |
RewriteRule ^\*$ http://www.esempio.com/*? [L,R=301] | |
# Esempio 2 | |
RewriteCond %{HTTP_HOST} ^m\.esempio\.com$ [NC] | |
RewriteCond %{QUERY_STRING} ^$ | |
RewriteRule ^\*$ http://www.esempio.com/*? [R=301,NE,NC,L] | |
# Esempio 3 | |
RewriteCond %{HTTP_HOST} ^m\.esempio\.com$ | |
RewriteRule ^$ http://www.esempio.com/? [L,R=301] | |
# Esempio 4 | |
RewriteCond %{HTTP_HOST} !^(m\.)?esempio\.com$ [NC] | |
RewriteRule .* http://www.esempio.com%{REQUEST_URI} [R=301,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Articolo di riferimento: https://www.evemilano.com/2017/09/migrare-mobile-responsive/