Skip to content

Instantly share code, notes, and snippets.

@ru2fac
Last active November 13, 2018 22:06
Embed
What would you like to do?
Redirect to new domain .htaccess
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} old-domain.ru [NC]
RewriteRule ^(.*)$ https://new-domain/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^([^www].*)$
RewriteRule ^(.*)$ http://www.%1/$1 [L,R=301]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment