O
O
Oleg Ivanov2016-03-23 10:26:59
htaccess
Oleg Ivanov, 2016-03-23 10:26:59

Why doesn't .htaccess redirect to robots.txt?

It is necessary to make different robots.txt for subdomains. Tried already in different ways everything exactly redirects to robots.txt at the root.
Tried like this, doesn't work:

RewriteCond %{HTTP_HOST} ^(.+).site.ru$
RewriteRule ^robots.txt seo/robots_%1.txt

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2016-03-26
@shambler81

so why did you decide that .htaccess applies to it at all?
The simplest explanation is that you have nginx + apache and nginx processes the statics.
In this case, you will need to write a redirect to nginx

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question