Forzare l'accesso su dominio con www
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
#Inserisci sempre www nel dominio | |
#Sostituisci 'example.com' con il tuo dominio | |
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^([a-z.]+)?example\.com$ [NC] | |
RewriteCond %{HTTP_HOST} !^www\. [NC] | |
RewriteRule .? http://www.%1example.com%{REQUEST_URI} [R=301,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://www.evemilano.com/2014/10/esempi-mod-rewrite-htaccess-apache/