A
A
Anatoly2016-06-21 22:21:35
PHP
Anatoly, 2016-06-21 22:21:35

Redirect from a mirror to a specific page?

There is a main site site.ru and it has a site.ru/promo page.
I registered a Promo.ru mirror and I want it to lead to the Promo page, but it doesn’t work. Leads to the root. I do a redirect in htaccess, the site itself on WP
I did this:

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On

RewriteCond %{HTTP_HOST} ^promo\.ru$
RewriteRule ^$ http://sitee.ru/promo/? [L,R=301]

</IfModule>

And so:
Redirect 301 promo.ru http://site.ru/promo/
Can someone tell me what the error is?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
web-mechanic, 2016-06-21
@Beefeater

So try:
RewriteCond %{HTTP_HOST} ^promo.ru$
RewriteRule ^(.*)$ site.ru/promo/? [R=301,L]
if domain with www, then:
RewriteCond %{HTTP_HOST} ^www.promo.ru$
RewriteRule ^(.*)$ site.ru/promo/? [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question