Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Forzare l'accesso su dominio con www
#Inserisci sempre www nel dominio
#Sostituisci '' con il tuo dominio
RewriteEngine on
RewriteCond %{HTTP_HOST} ^([a-z.]+)?example\.com$ [NC]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .?{REQUEST_URI} [R=301,L]
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment