P
P
PavelScron2017-03-28 20:40:56
MODX
PavelScron, 2017-03-28 20:40:56

Redirect and robots.txt?

There is a site on modx. It works redirect from www to a domain without www. But at the same time, when opening the robots.txt file, the redirect does not work.
Code in httacces
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\ele\.ru$ [NC]
RewriteRule ^(.*)$ ele.ru/$1 [R=301,L]
RewriteEngine On
RewriteBase / Tell me
what Could it be the issue and how can I fix it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vasya Petrov, 2017-03-28
@PavelScron

Can you tell me what could be wrong and how can I fix it?

The point is nginx, which intercepts static at the front. With pictures and other statics the same story.

A
Andrey Burov, 2017-03-28
@BuriK666

It seems that .txt gives nginx without the participation of apache.
You need to set up redirect in it.

D
DarWiM, 2017-04-06
@DarWiM

Alternatively, remove robots.txt and create a resource in MODX with robots alias and txt type

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question