.htaccess

artrush
На сайте с 06.07.2009
Offline
97
616

Хочу сделать 301 редирект!

У меня на сайте лежит этот файл с содержанием

php_value session.use_trans_sid 0

php_value session.use_cookies 1

php_value session.use_only_cookies 1

php_flag register_globals Off

<Files .htaccess>

Order allow,deny

Deny from all

</Files>

<IfModule mod_rewrite.c>

RewriteEngine On

Options +FollowSymlinks -Indexes -MultiViews

RewriteBase /

RewriteRule ^index.html$ index.php [L]

RewriteRule ^admin.html$ admin.php [L]

RewriteRule ^news.html$ index.php?news=yes [L]

RewriteRule ^price.html$ index.php?show_price=yes [L]

RewriteRule ^cart.html$ index.php?shopping_cart=yes [L]

RewriteRule ^wide_search.html$ index.php?search_with_change_category_ability=yes [L]

RewriteRule ^feedback.html$ index.php?feedback=yes [L]

RewriteRule ^compare.html$ index.php?comparison_products=yes [L]

RewriteRule ^page_([0-9]+).html$ index.php?show_aux_page=$1 [L]

RewriteRule ^product_([0-9]+).html$ index.php?productID=$1 [L]

RewriteRule ^category_([0-9]+).html$ index.php?categoryID=$1 [L]

RewriteRule ^category_([0-9]+)_offset_([0-9]+).html$ index.php?categoryID=$1&offset=$2 [L]

RewriteRule ^category_([0-9]+)_show_all.html$ index.php?categoryID=$1&show_all=yes [L]

RewriteRule ^show_news_([0-9]+).html$ index.php?fullnews=$1 [L]

</IfModule>

Что и куда идет?

Хотел заменить на

<IfModule mod_rewrite.c>

Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} ^site\.ru$ [NC]

RewriteRule ^(.*)$ http://www.site.ru/$1 [R=301,L]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/

RewriteRule ^index\.html$ http://www.site.ru/ [R=301,L]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/

RewriteRule ^index\.php$ http://www.site.ru/ [R=301,L]

</IfModule>

Но сайт перестает работать!

Может что не так?

icq 241309050

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий