Answer the question
In order to leave comments, you need to log in
Webmaster response from the page either 301 or 200. Problem with setting up a redirect?
Good afternoon.
I say right away that the redirect itself works without problems, and online checks do not reveal loops, but in the webmaster this situation is alarming on new sites and on old ones. New ones generally hang, somewhere far away in indexing. And the old ones do not seem to affect, but I'm worried that then the positions may fall.
Here is a screenshot of the new site:
And here is a site that has been indexed for a long time:
Here are the redirect settings:
AddDefaultCharset UTF-8
<IfModule mod_rewrite.c>
#Включаем отслеживание сим-ссылок
Options +FollowSymLinks
#Запускаем url_rewriting
RewriteEngine On
RewriteBase /
RewriteCond %{SERVER_PORT} !^443$
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index(\.(php|html|htm))?\ HTTP/
RewriteRule ^(.*)index\.(php|html|htm)$ $1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteCond %{THE_REQUEST} \.(php|html|htm)\ HTTP/
RewriteCond %{THE_REQUEST} !form\.(php|html|htm)\ HTTP/
RewriteRule ^(.*)\.(php|html|htm)$ $1 [R=301,L]
RewriteCond %{QUERY_STRING} ^(.+)$ [NC]
RewriteRule ^(.*)$ $1? [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
# сжатие text, html, javascript, css, xml:
<ifModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript
</ifModule>
# кеш браузера
<IfModule mod_expires.c>
ExpiresActive On
#по умолчанию кеш в 5 секунд
ExpiresDefault "access 7 days"
# Включаем кэширование изображений и флэш на месяц
ExpiresByType image/x-icon "access plus 1 month"
ExpiresByType image/jpeg "access plus 4 weeks"
ExpiresByType image/png "access plus 30 days"
ExpiresByType image/gif "access plus 43829 minutes"
ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
# Включаем кэширование css, javascript и текстовых файлоф на одну неделю
ExpiresByType text/css "access plus 604800 seconds"
ExpiresByType text/javascript "access plus 604800 seconds"
ExpiresByType application/javascript "access plus 604800 seconds"
ExpiresByType application/x-javascript "access plus 604800 seconds"
# Включаем кэширование html и htm файлов на один день
ExpiresByType text/html "access plus 43200 seconds"
# Включаем кэширование xml файлов на десять минут
ExpiresByType application/xhtml+xml "access plus 600 seconds"
# Нестандартные шрифты сайта
ExpiresByType application/x-font-ttf "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
</ifModule>
# Cache-Control
<ifModule mod_headers.c>
# 30 дней
<filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>
# 30 дней
<filesMatch "\.(css|js)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>
# 2 дня
<filesMatch "\.(xml|txt)$">
Header set Cache-Control "max-age=172800, public, must-revalidate"
</filesMatch>
# 1 день
<filesMatch "\.(html|htm|php)$">
Header set Cache-Control "max-age=172800, private, must-revalidate"
</filesMatch>
</ifModule>
#Запрет отдачи HTTP-заголовков Vary браузерам семейства MSIE
<IfModule mod_setenvif.c>
BrowserMatch "MSIE" force-no-vary
BrowserMatch "Mozilla/4.[0-9]{2}" force-no-vary
</IfModule>
<IfModule mod_deflate.c>
#Включаем сжатие
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/css
<IfModule mod_setenvif.c>
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>
</IfModule>
Answer the question
In order to leave comments, you need to log in
Here are your codes, everything is going right there
https://bertal.ru/index.php?a5745778/parkotel-soch...
Now point by point
RewriteCond %{SERVER_PORT} !^443$
RewriteRule .* https
://%{SERVER_NAME} %{REQUEST_URI} [R=301,L]
Here's one rule for you that redirects visitors to http to https
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http
://%1 /$1 [R=301,L]
Let's look at the protocol for the second rule.
Well, yes, .htaccess is read from top to bottom, and additions are reread several times until the links settle down.
https://bertal.ru/index.php?a5745822/www.parkotel-...
In general, take all the pages of the old site, collect them in an excel file.
and then redirect each page to each page of the new one (if this is a site refactoring)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question