Skip to content

Instantly share code, notes, and snippets.

@evemilano
Created January 27, 2015 13:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evemilano/68a23f256c595ee5ba9a to your computer and use it in GitHub Desktop.
Save evemilano/68a23f256c595ee5ba9a to your computer and use it in GitHub Desktop.
Forzare l'accesso su dominio con www
#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]
@evemilano
Copy link
Author

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