Skip to content

Instantly share code, notes, and snippets.

@evemilano
Created December 17, 2014 22:37
Show Gist options
  • Save evemilano/4e8492cb6dd05c3453f9 to your computer and use it in GitHub Desktop.
Save evemilano/4e8492cb6dd05c3453f9 to your computer and use it in GitHub Desktop.
Redirezioni di massa verso un altro dominio
RewriteEngine on
# Redirect to another domain: www.sitodidestinazione.it.
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} !^(www\.)?sitodidestinazione\.it$ [NC]
RewriteRule .* http://www.sitodidestinazione.it%{REQUEST_URI} [R=301,L]
# Same for HTTPS:
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} !^(www\.)?sitodidestinazione\.it$ [NC]
RewriteRule .* https://www.sitodidestinazione.it%{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