Перенос сайта и код 200 на несуществующие файлы

S
На сайте с 26.09.2016
Offline
0
858

Проблема в следующем. Был сайт на одном хостинге, перенесли полностью на другой. При этом физически папки и файлы остались на предыдущем.

На момент переноса Яндексом были загружены > 2000 страниц и файлов от предыщего сайта.

Настроили редиректы, файлы htaccess, robots.txt. Но вот странная ситуация, например: http://site.ru/catalog/ - недоступен, выдает 404 ошибку (как и должно быть, т.к. catalog - это папка от старого сайта), но вот файл http://site.ru/catalog/img.png - доступен. Точнее, самого-то файла физически нет, но при обращении открывается сайт. Причем не главная или какая-то другая, а смесь главной и какой-то еще (каждый раз по-разному).

К примеру:

http://uborka24.spb.ru/upload/15_11_13.jpg - доступен и, о ужас, в индексе.

http://uborka24.spb.ru/upload/ - выдает 404 ошибку.

Отчего так? Что можно предпринять?

Вот листинг файлов htaccess:

#

# for uborka24.spb.ru

# by sejunctus

# date: 21.09.2016

#

## запрещаем листинг корневых директорий. работает

IndexIgnore *

#####

## включаем базовые опции. работает

Options +FollowSymLinks

Options -Indexes

#####

## используем mod_rewrite

RewriteEngine on

#####

## редирект на главную uborka24.spb.ru. работает

RewriteCond %{HTTP_HOST} ^www\.uborka24.spb\.ru$ [NC]

RewriteRule (.*) http://uborka24.spb.ru/$1 [R=301,L]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/

RewriteRule ^index\.php$ http://uborka24.spb.ru/ [R=301,L]

#####

## убираем слеш на конце. работает

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_URI} ^(.+)/$

RewriteRule ^(.+)/$ /$1 [R=301,L]

#####

RewriteCond %{REQUEST_URI} ^(.*)\&post=

RewriteRule ^(.*)\&post=(.*)$ $1 [R=301,L]

RewriteCond %{REQUEST_URI} ^(.*)\&sa=

RewriteRule ^(.*)\&sa=(.*)$ $1 [R=301,L]

RewriteCond %{QUERY_STRING} ^utm_source= [NC]

RewriteRule (.*) $1? [R=301,L]

## настраиваем 404 ошибку. работает

# страница с 404 ошибкой в шаблоне, файл error.php

#####

## настраиваем 301 редирект. работает

Redirect 301 /about-company http://uborka24.spb.ru/o-kompanii

Redirect 301 /prices http://uborka24.spb.ru/tseny

Redirect 301 /cleaning-of-commercial-property-in-saint-petersburg http://uborka24.spb.ru/uborka-kommercheskoj-nedvizhimosti

Redirect 301 /cleaning-houses http://uborka24.spb.ru/uborka-kottedzhej

Redirect 301 /dry-cleaning-at-home http://uborka24.spb.ru/khimchistka-na-domu

Redirect 301 /calculator http://uborka24.spb.ru

Redirect 301 /spring-cleaning http://uborka24.spb.ru/generalnaya-uborka

Redirect 301 /cleaning-cottages-after-construction http://uborka24.spb.ru/uborka-kottedzhej/uborka-kottedzha-posle-remonta

Redirect 301 /dry-cleaning-of-carpets http://uborka24.spb.ru/khimchistka-na-domu

Redirect 301 /outsourcing-services http://uborka24.spb.ru/uslugi-autsorsinga

Redirect 301 /services http://uborka24.spb.ru/uslugi

Redirect 301 /contacts http://uborka24.spb.ru/kontakty

Redirect 301 /cleaning-of-apartments-in-saint-petersburg http://uborka24.spb.ru/uborka-kvartir

Redirect 301 /cleaning-after-repair http://uborka24.spb.ru/uborka-posle-remonta

Redirect 301 /preparation-of-the-apartment-for-birth-of-a-child http://uborka24.spb.ru/podgotovka-kvartiry-k-rozhdeniyu-rebenka

Redirect 301 /cleaning-of-private-apartments http://uborka24.spb.ru/uborka-kvartir/uborka-chastnykh-kvartir

Redirect 301 /cleaning-offices http://uborka24.spb.ru/uborka-ofisov

Redirect 301 /washing-windows http://uborka24.spb.ru/myte-okon

Redirect 301 /regular-cleaning http://uborka24.spb.ru/uborka-na-postoyannoj-osnove

Redirect 301 /outstaffing-services http://uborka24.spb.ru/uslugi-autstaffinga

Redirect 301 /cleaning-of-apartments-after-renovation http://uborka24.spb.ru/uborka-kvartir/uborka-kvartir-posle-remonta

Redirect 301 /express-cleaning-of-apartments http://uborka24.spb.ru/uborka-kvartir/bystraya-uborka-kvartiry

#####

## закрываем от распространенных эксплойтов

RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]

RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]

RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]

RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})

RewriteRule .* index.php [F]

#####

## Begin - Custom redirects

#

# If you need to redirect some pages, or set a canonical non-www to

# www redirect (or vice versa), place that code here. Ensure those

# redirects use the correct RewriteRule syntax and the [R=301,L] flags.

#

## End - Custom redirects

##

# Uncomment following line if your webserver's URL

# is not directly related to physical file paths.

# Update Your Joomla! Directory (just / for root).

##

# RewriteBase /

## настройки чпу joomla. работает

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteCond %{REQUEST_URI} !^/index\.php

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule .* index.php [L]

#####

## запрещаем загрузку файлов с внешних сайтов

RewriteEngine On

RewriteCond %{HTTP_REFERER} !^$

RewriteCond %{HTTP_REFERER} !^http://(www.)?uborka24.spb.ru/ [nc]

RewriteRule .*.(gif|jpg|png)$ http://uborka24.spb.ru/megapolis_logo.png [nc]

#####

и robots.txt:

# If the Joomla site is installed within a folder such as at

# e.g. www.example.com/joomla/ the robots.txt file MUST be

# moved to the site root at e.g. www.example.com/robots.txt

# AND the joomla folder name MUST be prefixed to the disallowed

# path, e.g. the Disallow rule for the /administrator/ folder

# MUST be changed to read Disallow: /joomla/administrator/

#

# For more information about the robots.txt standard, see:

# http://www.robotstxt.org/orig.html

#

# For syntax checking, see:

# http://tool.motoricerca.info/robots-checker.phtml

User-agent: Yandex

Disallow: /administrator/

Disallow: /cache/

Disallow: /includes/

Disallow: /installation/

Disallow: /language/

Disallow: /libraries/

Disallow: /modules/

Disallow: /plugins/

Disallow: /tmp/

Disallow: /layouts/

Disallow: /cli/

Disallow: /bin/

Disallow: /logs/

Disallow: /components/

Disallow: /component/

Disallow: /component/tags*

Disallow: /*mailto*

Disallow: /*start*

Disallow: /*print*

Disallow: /*feed*

Disallow: /*search*

Disallow: /*users*

Disallow: /upload/

Disallow: /img/

Disallow: /images/

Host: uborka24.spb.ru

Sitemap: http://uborka24.spb.ru/sitemap.xml

User-agent: *

Allow: /*.css?*$

Allow: /*.js?*$

Allow: /*.jpg?*$

Allow: /*.png?*$

Disallow: /administrator/

Disallow: /cache/

Disallow: /includes/

Disallow: /installation/

Disallow: /language/

Disallow: /libraries/

Disallow: /modules/

Disallow: /plugins/

Disallow: /tmp/

Disallow: /layouts/

Disallow: /cli/

Disallow: /bin/

Disallow: /logs/

Disallow: /components/

Disallow: /component/

Disallow: /*mailto*

Disallow: /*start*

Disallow: /*print*

Disallow: /*feed*

Disallow: /*search*

Disallow: /*users*

Disallow: /upload/

Disallow: /img/

Disallow: /images/

Sitemap: http://uborka24.spb.ru/sitemap.xml

В тех. поддержке Яндекса, как обычно, ничего толком не сказали. Типа, разбирайтесь сами.

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий