Вроде ничего сложного. Ставим autoredirector. Удаляем ненужный товар, копируем его адрес в поле редиректа, указываем id нового товара. Открываем браузер, вставляем старый адрес и… получаем 404.
Ладно. Качаем и устанавливаем SEOTab. Открывает товар, добавляем старый адрес удаленного товара. Обновляем страницу в браузере — 404.
Открываем товар в «быстро обновить». Бог с тобой. Пишем — заморозить URL и убираем просто часть адреса у товара. Сохраняем. Вставляем в браузер старый адрес этого же товара — 404.
Как такое возможно? Причем замечаю, что система дает дублировать старые адреса при добавлении их в редирект, а должна выдать ошибку «уже имеется».
После манипуляций в ресурсе и его сохранении ошибок в журнале сайта нет.
Ставила просто redirector — никакой реакции и у него.
Хтаццесс вроде простой:
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_URI} !\..+$
#RewriteRule ^([^/]+(/[^/]+)?)$ /$1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
RewriteCond %{THE_REQUEST} //
RewriteRule .* /$0 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^(.*)index\.php$ $1 [R=301,L]
DirectoryIndex index.php
ServerSignature Off
AddDefaultCharset UTF-8
<ifModule mod_php.c>
php_value upload_max_filesize 8M
php_value post_max_size 10M
php_value default_charset utf-8
php_value max_execution_time 200
</ifModule>
AddHandler application/x-httpd-php .html
AddHandler cgi-script .pl .py .jsp .asp .htm .shtml .sh .cgi
AddType application/x-javascript .js
AddType text/css .css
AddType text/xml .xml
AddType application/octet-stream .doc .mov .avi .pdf .xls
# ForceType application/x-httpd-php
<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_headers.c>
Header unset Vary
Header set Vary "Accept-Encoding, X-HTTP-Method-Override, X-Forwarded-For, Remote-Address, X-Real-IP, X-Forwarded-Proto, X-Forwarded-Host, X-Forwarded-Port, X-Forwarded-Server"
</ifModule>
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
mod_gzip_item_include mime ^text\.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image\.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>
<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>
<FilesMatch РЈ\.(ttf|otf|eot|svg)$Р¤ >
SetOutputFilter DEFLATE
</FilesMatch>
<ifModule mod_headers.c>
<FilesMatch "\.(html|htm)$">
Header set Cache-Control "max-age=43200"
</FilesMatch>
<FilesMatch "\.(js|css|txt)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>
<FilesMatch "\.(flv|swf|ico|gif|jpg|jpeg|png)$">
Header set Cache-Control "max-age=2592000"
</FilesMatch>
<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">
Header set Cache-Control "max-age=1"
</FilesMatch>
</IfModule>
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 5 seconds"
ExpiresByType image/x-icon "access plus 2592000 seconds"
ExpiresByType image/jpeg "access plus 2592000 seconds"
ExpiresByType image/png "access plus 2592000 seconds"
ExpiresByType image/gif "access plus 2592000 seconds"
ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
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"
ExpiresByType text/html "access plus 43200 seconds"
ExpiresByType application/xhtml+xml "access plus 600 seconds"
</ifModule>
Да и в настройках вроде все включено на ДА (friendly_urls, friendly_urls_strict, use_alias_path, use_frozen_parent_uris, stercseo.context-aware-alias)
Народ, от чего это может зависеть? Стоит Babel, сайт с несколькими языковыми версиями.
Александр 01.07.2017 16:23 #
Вараника 01.07.2017 16:27 #
Вараника 01.07.2017 21:38 #
Но это же не правильно… Почему-то пакет seotab не срабатывает сам по себе…
Руслан Алеев 03.07.2017 11:18 #
Вараника 03.07.2017 13:09 #
Руслан Алеев 03.07.2017 13:17 #
Вараника 03.07.2017 13:21 #