Answer the question
In order to leave comments, you need to log in
Setting up redirects?
The point is the following.
There is an old site - http://rukartina.ru/
(written on UMI CMS), you need to set up redirects to the new domain in .htaccess - https://rakovgallery.ru/
Initially, in the .htaccess of the old site (rukartina.ru) there are already redirects from http://www.rukartina.ru
to the address without www, that is, directly to http://rukartina.ru/
1. Is it correct to prescribe, this redirect:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} robots.txt$ [NC]
RewriteRule ^([^/]+) $1 [L]
RewriteCond %{HTTP_HOST} ^rukartina\.ru
RewriteRule ^(.*)$ https://rakovgallery.ru/$1 [R=301,L]
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} robots.txt$ [NC]
RewriteRule ^([^/]+) $1 [L]
RewriteCond %{HTTP_HOST} ^www.rukartina\.ru$ [NC]
RewriteRule ^(.*)$ https://rakovgallery.ru/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^rukartina\.ru
RewriteRule ^(.*)$ https://rakovgallery.ru/$1 [R=301,L]
Answer the question
In order to leave comments, you need to log in
2. When writing a redirect from the main page, rukartina.ru redirects to a non-existent page https://rakovgallery.ru/index.php
What's the problem?
RewriteRule ^(.*)$ index.php
, so you need to add redirects to the beginning of the file so that they work before other rules.RewriteEngine On
RewriteCond %{REQUEST_FILENAME} robots.txt$ [NC]
RewriteRule ^([^/]+) $1 [L]
RewriteCond %{HTTP_HOST} ^www.rukartina\.ru$ [NC]
RewriteRule ^(.*)$ https://rakovgallery.ru/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^rukartina\.ru
RewriteRule ^(.*)$ https://rakovgallery.ru/$1 [R=301,L]
RewriteEngine On
RewriteCond %{THE_REQUEST} "! /robots\.txt"
RewriteCond %{HTTP_HOST} ^(www\.|)rukartina\.ru$ [NC]
RewriteRule ^(.*)$ https://rakovgallery.ru/$1 [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question