Доброго времени суток, гуру.
Сайт сменил Joomla с 1,5 на 3,3, менялось все руками без автоматизации. Вроде все хорошо (кроме дублей ессно). Но при попытке настроить редирект с древних ссылок старого сайта на новые существующие страницы средствами htaccess выдает следующий результат:
1. страницы, привязанные к пунктам меню редиректит нормально.
2. при редиректе страницы из блога меняет конечный URL из htaccess по своему (примеры ниже).
При этом сторонними SEF не пользовался, в route не лазил и т.д.
Сам htaccess:
Options +FollowSymLinks
# mod_rewrite in use
RewriteEngine On
RewriteCond %{SERVER_PORT} ^443$ [OR]
RewriteCond %{HTTPS} =on
RewriteRule ^(.*)$ http://perevodpro.ru/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www.perevodpro.ru$ [NC]
RewriteRule ^(.*)$ http://perevodpro.ru/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www.xn--b1aeba0cbbfef.xn--p1ai$ [NC]
RewriteRule ^(.*)$ http://perevodpro.ru/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^xn--b1aeba0cbbfef.xn--p1ai$ [NC]
RewriteRule ^(.*)$ http://perevodpro.ru/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www.perevodpro.com$ [NC]
RewriteRule ^(.*)$ http://perevodpro.ru/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^perevodpro.com$ [NC]
RewriteRule ^(.*)$ http://perevodpro.ru/$1 [R=301,L]
RewriteCond %{QUERY_STRING} tp=(.*)
RewriteRule ^(.*)$ index.php [F,L]
########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
## Deny access to extension XML files (uncomment out to activate)
#<Files ~ "\.xml$">
#Order allow,deny
#Deny from all
#Satisfy all
#</Files>
## End of deny access to extension XML files
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
AddDefaultCharset utf-8
#
########## End - Rewrite rules to block out some common exploits
# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root)
RewriteBase /
php_value display_errors 0
php_value error_reporting 2047
########## Begin - Joomla! core SEF Section
#
RedirectPermanent /proekty/item/36-perevod-internet-stranits-i-sajtov http://perevodpro.ru/proekty/perevod-sajtov
RedirectPermanent /proekty/item/35-globalizatsiya-biznesa http://perevodpro.ru/proekty/globalizatsiya
RedirectPermanent /item/3-why-choose-us http://perevodpro.ru/why-choose-us
RedirectPermanent /item/2-our-price-promise http://perevodpro.ru/our-price
RedirectPermanent /about http://perevodpro.ru/about-us/item/9-who-we-are
RedirectPermanent /corporate http://perevodpro.ru/about-us/item/146-benefits
RedirectPermanent /about/vacancy http://perevodpro.ru/about-us/jobs
RedirectPermanent /archive http://perevodpro.ru/proekty/news/archive-news
RedirectPermanent /service http://perevodpro.ru/translation/uslugi
RedirectPermanent /price http://perevodpro.ru/translation/prices
RedirectPermanent /pay http://perevodpro.ru/translation/oplata
RedirectPermanent /sites http://perevodpro.ru/proekty/perevod-sajtov
RedirectPermanent /talk http://perevodpro.ru/translation/item/19-interpret
RedirectPermanent /forward http://perevodpro.ru/contacts
RedirectPermanent /apostille http://perevodpro.ru/translation/uslugi/apostille
RedirectPermanent /legalization http://perevodpro.ru/translation/uslugi/legalizatsiya
RedirectPermanent /globalization http://perevodpro.ru/proekty/globalizatsiya
RedirectPermanent /for-clients http://perevodpro.ru/about-us/for-clients
RedirectPermanent /docs-lang http://perevodpro.ru/translation/yazyki-i-dokumenty
RedirectPermanent /history http://perevodpro.ru/proekty/znaete-li-vy/item/145-born
RedirectPermanent /know-that http://perevodpro.ru/proekty/znaete-li-vy
ВОТ ЭТО:
RedirectPermanent /know-that/hiqh-quality-translate http://perevodpro.ru/proekty/znaete-li-vy/item/38-high-quality
RedirectPermanent /know-that/complexity http://perevodpro.ru/proekty/znaete-li-vy/item/37-complexity
RedirectPermanent /know-that/adverbs http://perevodpro.ru/proekty/znaete-li-vy/item/123-adverbs
RedirectPermanent /know-that/notariat http://perevodpro.ru/proekty/znaete-li-vy/item/124-notariat
RedirectPermanent /know-that/eng-hindi http://perevodpro.ru/proekty/znaete-li-vy/item/125-eng-india
RedirectPermanent /know-that/guild http://perevodpro.ru/proekty/znaete-li-vy/item/126-guild
RedirectPermanent /know-that/eng-america http://perevodpro.ru/proekty/znaete-li-vy/item/135-america-eng
RedirectPermanent /know-that/translate-and-law http://perevodpro.ru/proekty/znaete-li-vy/item/122-law-translate
RedirectPermanent /know-that/unusual http://perevodpro.ru/proekty/znaete-li-vy/item/136-unusual-tr
RedirectPermanent /know-that/machine-tr http://perevodpro.ru/proekty/znaete-li-vy/item/139-machine-tr
RedirectPermanent /know-that/quickly-tr http://perevodpro.ru/proekty/znaete-li-vy/item/137-quickly-tr
RedirectPermanent /know-that/not-tr http://perevodpro.ru/proekty/znaete-li-vy/item/134-not-tr
RedirectPermanent /know-that/sinhron http://perevodpro.ru/proekty/znaete-li-vy/item/138-sinhron
RedirectPermanent /know-that/failed-job http://perevodpro.ru/proekty/znaete-li-vy/item/133-failed-job
RedirectPermanent /know-that/fast http://perevodpro.ru/proekty/znaete-li-vy/item/132-fast
RedirectPermanent /know-that/season http://perevodpro.ru/proekty/znaete-li-vy/item/131-season
RedirectPermanent /know-that/important http://perevodpro.ru/proekty/znaete-li-vy/item/130-important
RedirectPermanent /know-that/yes http://perevodpro.ru/proekty/znaete-li-vy/item/129-consent
RedirectPermanent /know-that/lawyer http://perevodpro.ru/proekty/znaete-li-vy/item/128-lawyer
RedirectPermanent /know-that/medical http://perevodpro.ru/proekty/znaete-li-vy/item/127-medical
RedirectPermanent /know-that/book http://perevodpro.ru/proekty/znaete-li-vy/item/140-book
RedirectPermanent /know-that/instruction http://perevodpro.ru/proekty/znaete-li-vy/item/141-instruction
RedirectPermanent /know-that/technics http://perevodpro.ru/proekty/znaete-li-vy/item/142-technics
RedirectPermanent /know-that/typografy http://perevodpro.ru/proekty/znaete-li-vy/item/144-typografy
RedirectPermanent /know-that/remotely http://perevodpro.ru/proekty/znaete-li-vy/item/143-remotely
=КОНЕЦ=
RedirectPermanent /news /proekty/news
И ВОТ ЭТО:
RedirectPermanent /news/161-skandal-ukr http://perevodpro.ru/proekty/news/archive-news/item/69-skandal-ukr
RedirectPermanent /news/157-vto-1 http://perevodpro.ru/proekty/news/archive-news/item/65-vto-1
RedirectPermanent /news/138-notar-az http://perevodpro.ru/proekty/news/archive-news/item/45-notar-az
RedirectPermanent /news/136-starikov1 http://perevodpro.ru/proekty/news/archive-news/item/43-starikov1
RedirectPermanent /news/184-chinese-song http://perevodpro.ru/proekty/news/archive-news/item/92-chinese-song
RedirectPermanent /news/183-seminar http://perevodpro.ru/proekty/news/archive-news/item/91-seminar
RedirectPermanent /news/127-ny2012 http://perevodpro.ru/proekty/news/archive-news/item/42-ny2012
RedirectPermanent /news/128-345 http://perevodpro.ru/proekty/news/archive-news/item/22-345
RedirectPermanent /news/129-assembly-rus-6 http://perevodpro.ru/proekty/news/archive-news/item/23-assembly-rus-6
RedirectPermanent /news/130-tury http://perevodpro.ru/proekty/news/archive-news/item/24-tury
RedirectPermanent /news/131-assembly-rus-6 http://perevodpro.ru/proekty/news/archive-news/item/39-rusyaz
RedirectPermanent /news/132-cherokee http://perevodpro.ru/proekty/news/archive-news/item/40-cherokee
RedirectPermanent /news/135-literacy http://perevodpro.ru/proekty/news/archive-news/item/41-literacy
RedirectPermanent /news/137-ya-tr http://perevodpro.ru/proekty/news/archive-news/item/44-ya-tr
RedirectPermanent /news/139-2013 http://perevodpro.ru/proekty/news/archive-news/item/47-2013
RedirectPermanent /news/140-law-ru-ukr http://perevodpro.ru/proekty/news/archive-news/item/48-law-ru-ukr
RedirectPermanent /news/141-tourism-01-2013 http://perevodpro.ru/proekty/news/archive-news/item/49-tourism-01-2013
RedirectPermanent /news/142-brasile-ukr http://perevodpro.ru/proekty/news/archive-news/item/50-brasile-ukr
RedirectPermanent /news/143-lang-kirgiz http://perevodpro.ru/proekty/news/archive-news/item/51-lang-kirgiz
RedirectPermanent /news/144-valentin-2013 http://perevodpro.ru/proekty/news/archive-news/item/52-valentin-2013
RedirectPermanent /news/145-onegin-fr http://perevodpro.ru/proekty/news/archive-news/item/53-onegin-fr
RedirectPermanent /news/146-exkurs-2013 http://perevodpro.ru/proekty/news/archive-news/item/54-exkurs-2013
RedirectPermanent /news/147-meteor-1 http://perevodpro.ru/proekty/news/archive-news/item/55-meteor-1
RedirectPermanent /news/148-mi5-cra http://perevodpro.ru/proekty/news/archive-news/item/56-mi5-cra
RedirectPermanent /news/149-day-translate http://perevodpro.ru/proekty/news/archive-news/item/57-day-translate
RedirectPermanent /news/150-russian-fest http://perevodpro.ru/proekty/news/archive-news/item/58-russian-fest
RedirectPermanent /news/151-volonter-tr http://perevodpro.ru/proekty/news/archive-news/item/59-volonter-tr
RedirectPermanent /news/152-paparim-tr http://perevodpro.ru/proekty/news/archive-news/item/60-paparim-tr
RedirectPermanent /news/153-snow-queen http://perevodpro.ru/proekty/news/archive-news/item/61-snow-queen
RedirectPermanent /news/154-evenki http://perevodpro.ru/proekty/news/archive-news/item/62-evenki
RedirectPermanent /news/155-udav http://perevodpro.ru/proekty/news/archive-news/item/63-udav
RedirectPermanent /news/156-war http://perevodpro.ru/proekty/news/archive-news/item/64-war
RedirectPermanent /news/158-games http://perevodpro.ru/proekty/news/archive-news/item/66-games
RedirectPermanent /news/159-new-custom-13 http://perevodpro.ru/proekty/news/archive-news/item/67-new-custom-13
RedirectPermanent /news/160-saakashvili http://perevodpro.ru/proekty/news/archive-news/item/68-saakashvili
RedirectPermanent /news/163-trans-sverd http://perevodpro.ru/proekty/news/archive-news/item/71-trans-sverd
RedirectPermanent /news/162-may-2013 http://perevodpro.ru/proekty/news/archive-news/item/70-may-2013
RedirectPermanent /news/164-ch3st327ukrf http://perevodpro.ru/proekty/news/archive-news/item/72-ch3st327ukrf
RedirectPermanent /news/165-rus-fin1 http://perevodpro.ru/proekty/news/archive-news/item/73-rus-fin1
RedirectPermanent /news/166-innovus-13 http://perevodpro.ru/proekty/news/archive-news/item/74-innovus-13
RedirectPermanent /news/167-autotranslate1 http://perevodpro.ru/proekty/news/archive-news/item/75-autotranslate1
RedirectPermanent /news/168-travelavisas http://perevodpro.ru/proekty/news/archive-news/item/76-travelavisas
RedirectPermanent /news/169-gms-ua-1 http://perevodpro.ru/proekty/news/archive-news/item/77-gms-ua-1
RedirectPermanent /news/170-trans-olland http://perevodpro.ru/proekty/news/archive-news/item/78-trans-olland
RedirectPermanent /news/171-notariat-2013 http://perevodpro.ru/proekty/news/archive-news/item/79-notariat-2013
RedirectPermanent /news/172-gpu-1 http://perevodpro.ru/proekty/news/archive-news/item/80-gpu-1
RedirectPermanent /news/173-esquire http://perevodpro.ru/proekty/news/archive-news/item/81-esquire
RedirectPermanent /news/174-es http://perevodpro.ru/proekty/news/archive-news/item/82-es
RedirectPermanent /news/175-usa-russia http://perevodpro.ru/proekty/news/archive-news/item/83-usa-russia
RedirectPermanent /news/176-russian-there http://perevodpro.ru/proekty/news/archive-news/item/84-russian-there
RedirectPermanent /news/177-sci-eng http://perevodpro.ru/proekty/news/archive-news/item/85-sci-eng
RedirectPermanent /news/178-universiada http://perevodpro.ru/proekty/news/archive-news/item/86-universiada-13
RedirectPermanent /news/179-reinkar http://perevodpro.ru/proekty/news/archive-news/item/87-reinkar
RedirectPermanent /news/180-google-tr http://perevodpro.ru/proekty/news/archive-news/item/88-google-tr
RedirectPermanent /news/181-google-sinkh http://perevodpro.ru/proekty/news/archive-news/item/89-google-sinkh
RedirectPermanent /news/182-rasist http://perevodpro.ru/proekty/news/archive-news/item/90-rasist
RedirectPermanent /news/185-sakhfestival http://perevodpro.ru/proekty/news/archive-news/item/93-sakhfestival
RedirectPermanent /news/186-10mlnevro http://perevodpro.ru/proekty/news/archive-news/item/94-10mlnevro
RedirectPermanent /news/187-10mlnevro http://perevodpro.ru/proekty/news/archive-news/item/95-bomzh
RedirectPermanent /news/188-games-2014 http://perevodpro.ru/proekty/news/archive-news/item/96-games-2014
RedirectPermanent /news/189-kopeysk http://perevodpro.ru/proekty/news/archive-news/item/97-kopeysk
RedirectPermanent /news/190-holiday http://perevodpro.ru/proekty/news/archive-news/item/98-holiday
RedirectPermanent /news/191-sochi-2014 http://perevodpro.ru/proekty/news/archive-news/item/99-sochi-2014-translater
RedirectPermanent /news/192-sochi-2014 http://perevodpro.ru/proekty/news/archive-news/item/100-sochi-2014-eng
RedirectPermanent /news/193-aiim http://perevodpro.ru/proekty/news/archive-news/item/101-aiim
RedirectPermanent /news/194-ukraine-es http://perevodpro.ru/proekty/news/archive-news/item/102-ukraine-es
RedirectPermanent /news/195-freelance http://perevodpro.ru/proekty/news/archive-news/item/103-freelance
RedirectPermanent /news/196-surdo http://perevodpro.ru/proekty/news/archive-news/item/104-surdo
RedirectPermanent /news/197-literature http://perevodpro.ru/proekty/news/archive-news/item/105-literature
RedirectPermanent /news/198-russian http://perevodpro.ru/proekty/news/archive-news/item/106-russian
RedirectPermanent /news/199-promt http://perevodpro.ru/proekty/news/archive-news/item/107-promt
RedirectPermanent /news/200-odessa http://perevodpro.ru/proekty/news/archive-news/item/108-odessa
RedirectPermanent /news/201-estoniya http://perevodpro.ru/proekty/news/archive-news/item/109-estoniya
RedirectPermanent /news/202-kyrgyz http://perevodpro.ru/proekty/news/archive-news/item/110-kyrgyz
RedirectPermanent /news/203-usa http://perevodpro.ru/proekty/news/archive-news/item/111-usa
RedirectPermanent /news/204-omsk http://perevodpro.ru/proekty/news/archive-news/item/112-omsk
RedirectPermanent /news/205-gb http://perevodpro.ru/proekty/news/archive-news/item/113-gb
RedirectPermanent /news/206-sochi-2014 http://perevodpro.ru/proekty/news/archive-news/item/114-sochi-2014-translate
RedirectPermanent /news/207-other http://perevodpro.ru/proekty/news/archive-news/item/115-other
RedirectPermanent /news/208-notary http://perevodpro.ru/proekty/news/archive-news/item/116-notary
RedirectPermanent /news/209-clients-day http://perevodpro.ru/proekty/news/archive-news/item/117-clients-day
RedirectPermanent /news/210-moshennik http://perevodpro.ru/proekty/news/archive-news/item/118-moshennik
RedirectPermanent /news/211-tel http://perevodpro.ru/proekty/news/archive-news/item/119-tel
RedirectPermanent /news/212-may-2014 http://perevodpro.ru/proekty/news/archive-news/item/120-may-2014
RedirectPermanent /news/213-june14 http://perevodpro.ru/proekty/news/archive-news/item/121-june14
RedirectPermanent /news/133-happy-new-year-2013 http://perevodpro.ru/proekty/news/archive-news/item/46-happy-new-year-2013
=КОНЕЦ=
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section
## ASG test
RewriteCond %{REQUEST_URI} ^(.*)CAST(.*) [OR]
RewriteCond %{REQUEST_URI} ^(.*)DECLARE(.*) [NC]
RewriteRule ^.* - [F,L]
php_flag allow_url_fopen off
php_flag disable_functions show_source
php_flag disable_functions system
php_flag disable_functions shell_exec
php_flag disable_functions passthru
php_flag disable_functions exec
php_flag disable_functions phpinfo
php_flag disable_functions popen
php_flag disable_functions proc_open
Order deny,allow
Deny from env=blocktheaccess
FileETag MTime Size
<ifmodule mod_expires.c>
<filesmatch ".(jpg|jpeg|gif|png|ico|css|js)$">
ExpiresActive on
ExpiresDefault "access plus 1 month"
</filesmatch>
</ifmodule>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
</IfModule>
<ifmodule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_item_include file \.js$
mod_gzip_item_include file \.css$ </ifmodule>
</IfModule>
<IfModule mod_headers.c>
<FilesMatch "\.(js|css|xml|gz)$">
Header append Vary: Accept-Encoding
</FilesMatch>
</IfModule>
ErrorDocument 404 /404
#
## 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 /
## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the request is for something within the component folder,
# or for the site root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.
Так вот, отмеченные блоки редиректит не так как написано в htaccess, а убирает из ссылки
item/. В результате чего возникает 404 страница. Но если конечную строку просто вбить в адрес и попытаться загрузить страницу, то все нормально, все открывает и ничего из ссылки не убирается. Из чего я сделал вывод, что ошибка в файле htaccess.
Все SEO настройки проверил, все пролез.
У кого какие мысли по этому поводу, может у меня где закралась ошибка?