G
G
Gregory2017-06-01 21:33:48
Apache HTTP Server
Gregory, 2017-06-01 21:33:48

Magento 2.1.4 redirects with code 301 instead of 404 (www.mysite.ru/index.php/any text) how to fix?

Some details :
Apache/2.4.18 (Ubuntu)
Magento 2.1.4
.htaccess

<IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
    RewriteRule .* - [L,R=405]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule .* index.php [L]
</IfModule>

in this situation www.mysite.ru/index.php/any text
the following occurs
HTTP/1.0 301 Moved Permanently
Date: Thu, 01 Jun 2017 18:20:48 GMT
Server: Apache/2.4.18 (Ubuntu)
Set-Cookie: PHPSESSID=b578546iszc10su104e8mf9n77; expires=Thu, 01-Jun-2017 19:20:48 GMT; Max-Age=3600; path=/; domain=www.mysite.ru; HttpOnly
Expires: Wed, 01 Jun 2016 18:20:48 GMT
Cache-Control: max-age=0, must-revalidate, no-cache, no-store
Pragma: no-cache
Location: https://www.mysite.ru/%EB%FE%E1%EE%E9/
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
X-UA-Compatible: IE=edge
Connection: close
Content-Type: text/html; charset=UTF-8

and then probably redirects to a 404 page.
Why such a situation arose - I am not the first to own the domain and Yandex constantly finds some new pages, obviously of the past owner of the domain, I naturally don’t have such pages, in fact, a lot of duplicates arose because of this.
What can be done about it?
PS The www.mysite.ru domain is fictional, in fact, it is different, but everything that follows the "/" is one to one.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg Batishchev, 2017-11-27
@z0rg

maybe your domain is specified in the settings as mysite.ru

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question