S
S
SeiLove2015-10-07 16:33:21
htaccess
SeiLove, 2015-10-07 16:33:21

Correct 301 redirect in .htaccess?

How to do a 301 redirect correctly? Let's say for a certain domain do-men.ru.com .. I seem to be doing everything according to the manuals, but something doesn't want to work. Maybe someone will tell?

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^do-men\.ru\.com$	[NC]
RewriteRule ^(.*)$ http://www.do-men.ru.com/$1	[R=301,L]

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
SeiLove, 2015-10-08
@SeiLove

The problem was solved by a workaround. All attempts at self-registration in .htaccess did not give a result, unfortunately. In the hosting settings, there was an internal option for redirecting domains, filling in the fields there and configured it as required. Thanks everyone for the help!

N
Nastya, 2015-10-07
@nastyamyaots

Try this:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^do-men.ru.com
RewriteRule (.*) www.do-men.ru.com/$1 [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question