Skip to content

Instantly share code, notes, and snippets.

@DaSchTour
Created February 17, 2013 20:56
Show Gist options
  • Save DaSchTour/4973415 to your computer and use it in GitHub Desktop.
Save DaSchTour/4973415 to your computer and use it in GitHub Desktop.
redirect wrong URL to the correct target without www to www and with "wrong" end to .de
RewriteCond %{HTTP_HOST} !^www\.(.*)$ [OR]
RewriteCond %{HTTP_HOST} ^www\.(.*)\.(com|net|org|info|eu)$
RewriteRule ^(.*)$ http://www.%1.de/$1 [L,R=301]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment