301 редирект

Toolma4
На сайте с 25.02.2010
Offline
113
472

Уважаемые знатоки.

Серевер Apache, делаю редирект с www.сайт.ру на сайт.ру

В .htaccess уже есть следующее:



AddDefaultCharset UTF-8

DirectoryIndex index.php

RewriteEngine On



RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^shop/(repo_themes|js|3rdparty|images_common|products_pictures|images|themes|css)/(.*)$ published/SC/html/scripts/$1/$2?frontend=1 [L]



RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^shop/(imgval.php|wbs_messageserserver.php) published/SC/html/scripts/$1 [L]



RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^(repo_themes|js|3rdparty|images_common|products_pictures|images|themes|css)/(.*)$ published/SC/html/scripts/$1/$2?frontend=1 [L]



RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^(imgval.php|wbs_messageserserver.php|get_file.php) published/SC/html/scripts/$1 [L]



RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^shop(.*) published/SC/html/scripts/$1&frontend=1 [L]



RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^photos/(album|view)/(.*) photos/index.php?q=$1/$2 [L,QSA]



RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^photos/fullsize/(.*)/(.*) photos/fullsize.php?filename=$1&hash=$2 [L,QSA]



RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^photos/(.+)$ photos/index.php?q=$1 [L,QSA]





RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^login/(.*) login/index.php [L]



RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^installer/(.*) installer/index.php [L]



RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^published/$ published/index.php [L]



RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_URI} !^published

RewriteRule (.*) published/SC/html/scripts/index.php?__furl_path=$1&frontend=1 [QSA]

В связи с этим вопрос

Добавить надо:

1 вариант

RewriteEngine On

RewriteCond %{HTTP_HOST} ^www.сайт.ru$ [NC]
RewriteRule ^(.*)$ http://сайт.ru/$1 [R=301,L]

или

2 вариант


RewriteCond %{HTTP_HOST} ^www.сайт.ru$ [NC]
RewriteRule ^(.*)$ http://сайт.ru/$1 [R=301,L]
W
На сайте с 09.10.2004
Offline
46
#1

второй....

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