Skip to content

Instantly share code, notes, and snippets.

@judbd
Created July 20, 2014 16:28
Show Gist options
  • Save judbd/72dc021acf8756a782a1 to your computer and use it in GitHub Desktop.
Save judbd/72dc021acf8756a782a1 to your computer and use it in GitHub Desktop.
.htaccess de redirection de multidomaines avec ou sans www pour OVH ou autres
Options -Indexes
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.eu$ [OR]
RewriteCond %{HTTP_HOST} ^www\.domain\.eu$ [OR]
RewriteCond %{HTTP_HOST} ^domain\.fr$ [OR]
RewriteCond %{HTTP_HOST} ^www\.domain\.fr$ [OR]
RewriteCond %{HTTP_HOST} ^mescouilles\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mescouilles\.com$ [OR]
RewriteCond %{HTTP_HOST} ^domain\.com$
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,QSA,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment