Настроил несколько редиректов, но не получается сделать редирект вида:
Code: Select all
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^(.+).(html|htm)$
RewriteRule ^(.+).(html|htm)$ /$1 [R=301,L]
сейчас в .htaccess вот что:
Code: Select all
Options +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^frost-invest\.ru$ [NC]
RewriteRule ^(.*)$ http://www.frost-invest.ru/$1 [R=301,L]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^(.+)/$
RewriteRule ^(.+)/$ /$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.(php|html|htm)\ HTTP/
RewriteRule ^index\.(php|html|htm)$ http://www.frost-invest.ru [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^(.+).(html|htm)$
RewriteRule ^(.+).(html|htm)$ /$1 [R=301,L]
RewriteRule ^kommercheskaya-nedvizhimost$ http://www.frost-invest.ru/arenda-ofisov [R=301,L]
RewriteRule ^nedvizhimost/uslugi$ http://www.frost-invest.ru/uslugi [R=301,L]
RewriteRule ^nedvizhimost/kommercheskaya-nedvizhimost/nezhiloe-pomeschenie-na-ul-krasnaya-i-soni-krivoj$ http://www.frost-invest.ru/arenda-pomeshcheniy [R=301,L]
# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
</IfModule>