И снова 301

J
На сайте с 30.11.2005
Offline
125
251

Купил дроп, собрал список всех старых страниц, куда ведут беки, настроил 301 в .htaccess с этих старых страниц на главную. Результаты странные: что-то сработало, что-то нет.

Вот содержимое .htaccess

Options +FollowSymLinks

RewriteEngine On

Redirect 301 /falconry.htm https://www.site.co.uk

Redirect 301 /bed--breakfast/index.html https://www.site.co.uk

Redirect 301 /day-visitors https://www.site.co.uk

Redirect 301 /Alpacatrek.htm https://www.site.co.uk

Redirect 301 /bird-of-prey-activities/half-day-bird-of-prey-exper.html https://www.site.co.uk

Redirect 301 /bird-of-prey-activities/one-hour-bird-of-prey.html https://www.site.co.uk

Redirect 301 /day-visitors/index.html https://www.site.co.uk

Redirect 301 /day-visitors/our-owls/mottled-owl---mottley--.html https://www.site.co.uk

Redirect 301 /day-visitors/our-owls/tawny-owl---pip---strix.html https://www.site.co.uk

Redirect 301 /default.htm https://www.site.co.uk

Redirect 301 /exmoor-falconry/index.htm https://www.site.co.uk

Redirect 301 /exmoor-falconry/owls/Peruvianstriped-owl.htm https://www.site.co.uk

Redirect 301 /exmoor-falconry/owls/asian-wood-owl,-strix-leptogrammicas.htm https://www.site.co.uk

Redirect 301 /exmoor-falconry/owls/mottled-owl.htm https://www.site.co.uk

Redirect 301 /our-animals-and-birds-of/our-birds-of-prey/common-eurasian-buzzard--.html https://www.site.co.uk

Redirect 301 /our-animals-and-birds-of/our-owls/bengal-eagle-owl---snoopy.html https://www.site.co.uk

Redirect 301 /visitor-attraction.htm https://www.site.co.uk

Redirect 301 /visitor%20attraction.htm https://www.site.co.uk

RewriteCond %{HTTP_HOST} !^www\.

RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteCond %{HTTPS} off

RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Большинство страниц отрабатывает нормально и редиректит на главную. Но вот этот список выдает 404 ошибку:

/bed--breakfast/index.html

/Alpacatrek.htm (редиректит в Я.Браузер, но не редиректит в Хроме)

/day-visitors/index.html

/day-visitors/our-owls/mottled-owl---mottley--.html

/day-visitors/our-owls/tawny-owl---pip---strix.html

/visitor%20attraction.htm

Отдельный вопрос, как средиректить /index.html на /index.htm в корне сайта. Указанная выше схема положила главную с сообщением о зацикливании редиректа.

Нужен мудрый совет старших товарищей :dont:

Lazy Badger
На сайте с 14.06.2017
Offline
231
#1
Juggernaut:
Нужен мудрый совет старших товарищей

"Если ничего не помогает - прочтите, наконец, документацию!" (с)

Если не доку по Апачу, то хотя бы так

Redirecting Without Preserving the Filename
Several files that existed on the old server were no long present on the new server. Instead of preserving the file names in the redirection (which would result in a 404 not found error on the new server), the old files needed to be redirected to the root URL of the new domain.

Redirect: http://www.socengine.com/seo/s...
To: http://www.seomoz.org/

Solution:
Add the following directive:

RedirectMatch 301 /seo/someoldfile.php http://www.seomoz.org

Все мне проверять было лениво, но

/bed--breakfast/index.html

RedirectMatch 301 /bed--breakfast/index.html https://www.site.co.uk The new url is https://www.site.co.uk/ Test are stopped, a redirect will be made with status code 301

Alpacatrek

RedirectMatch 301 /Alpacatrek.htm https://www.site.co.uk The new url is https://www.site.co.uk/
Test are stopped, a redirect will be made with status code 301

/day-visitors/index.html

RedirectMatch 301 /day-visitors https://www.site.co.uk The new url is https://www.site.co.uk/index.html
Test are stopped, a redirect will be made with status code 301
Juggernaut:
Отдельный вопрос, как средиректить /index.html на /index.htm в корне сайта. Указанная выше схема положила главную с сообщением о зацикливании редиректа.

Аналогично вышеуказанному

RedirectMatch 301 /index.html https://www.site.co.uk/index.htm The new url is https://www.site.co.uk/index.htm
Test are stopped, a redirect will be made with status code 301
Производство жести методом непрерывного отжига

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