Answer the question
In order to leave comments, you need to log in
How to make a redirect from all pages of one domain to the main page of another domain?
From the site https://sto-tonn.com/contact/ I do it for a hundred tons.rf
I tried
RewriteRule ^([^/]+) $1 [L]
RewriteCond %{HTTP_HOST} ^sto-tonn\.ru
RewriteRule ^(.* )$ https://hundredtonn.rf/$1 [R=301,L]
and now it costs
RewriteCond %{REQUEST_URI} (.*)
RewriteRule ^(.*)$ http://hundredtonn.rf [L,R =301]
But the redirect only works from sto-tonn.ru, not from other pages
Answer the question
In order to leave comments, you need to log in
"hundred tons.rf" in punycode will be "xn--m1aabangb.xn--p1ai"
Redirect from all pages to the main page:
RewriteEngine on
RewriteRule ^ https://xn--m1aabangb.xn--p1ai/ [R=301,L]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(?:www\.|)sto-tonn\.ru [NC]
RewriteRule ^ https://xn--m1aabangb.xn--p1ai/ [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question