Проблема с 301 редиректом

G
На сайте с 01.09.2010
Offline
49
514

Доброго дня, форумчане.

Помогите с проблемой: есть сайт на modx. С этого сайта, а точнее с 2-х страниц, нужно сделать 301 редирект на главную страницу другого сайта (он на opencart).

Что я делаю... Прописываю в .htacces следующие строки (раньше прокатывало):

Redirect 301 /one-url.html http://site.ru
Redirect 301 /two-url.html http://site.ru

Редирект с урла происходит, но(!) с добавлением параметра.

То есть на выходе получается следующее - http://site.ru/?q=one-url.html

Где я тупанул?

Заранее спасибо!

Позиции своих сайтов я снимаю здесь (http://goo.gl/1SQ1Sl)! А тут (http://goo.gl/GfReqm) я чекаю доноров. СМС рассылка (http://smstoyou.sms.ru/) по самой низкой цене.
IL
На сайте с 20.04.2007
Offline
435
#1

Если выше по коду поднять?

... :) Облачные серверы от RegRu - промокод 3F85-3D10-806D-7224 ( http://levik.info/regru )
G
На сайте с 01.09.2010
Offline
49
#2
ivan-lev:
Если выше по коду поднять?

Разницы нет.

--

Содержимое .htacces:

[SPOILER]

RewriteEngine On
RewriteCond %{HTTP_HOST} ^site.ru$ [NC]
RewriteRule ^(.*)$ http://www.site.ru/$1 [R=301,L]

# MODx supports Friendly URLs via this .htaccess file. You must serve web
# pages via Apache with mod_rewrite to use this functionality, and you must
# change the file name from ht.access to .htaccess.
#
# Make sure RewriteBase points to the directory where you installed MODx.
# E.g., "/modx" if your installation is in a "modx" subdirectory. If you have
# problems with your .htaccess working at all, try un-commenting the first
# line above the "RewriteEngine On" directive.
#
# You may choose to make your URLs non-case-sensitive by adding a NC directive
# to your rule: RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]


#Options +FollowSymlinks
RewriteEngine On
RewriteBase /

# Fix Apache internal dummy connections from breaking [(site_url)] cache
RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
RewriteRule .* - [F,L]

# Rewrite www.domain.com -> domain.com -- used with SEO Strict URLs plugin
#RewriteCond %{HTTP_HOST} .
#RewriteCond %{HTTP_HOST} !^example-domain-please-change\.com [NC]
#RewriteRule (.*) http://example-domain-please-change.com/$1 [R=301,L]
#
# or for the opposite domain.com -> www.domain.com use the following
# >>> DO NOT USE BOTH THE ABOVE AND BELOW <<<
#
#RewriteCond %{HTTP_HOST} .
#RewriteCond %{HTTP_HOST} !^www\.example-domain-please-change\.com [NC]
#RewriteRule (.*) http://www.example-domain-please-change.com/$1 [R=301,L]

Redirect 301 /one-url.html http://site.ru
Redirect 301 /two-url.html http://site.ru


# Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent
# https://www.domain.com when your cert only allows https://secure.domain.com
#RewriteCond %{SERVER_PORT} !^443
#RewriteRule (.*) https://example-domain-please-change.com.com/$1 [R=301,L]



# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

# Make sure .htc files are served with the proper MIME type, which is critical # for XP SP2. Un-comment if your host allows htaccess MIME type overrides.

#AddType text/x-component .htc

#php_flag register_globals Off

# For servers that support output compression, you should pick up a bit of
# speed but un-commenting the following lines.

#php_flag zlib.output_compression On
#php_value zlib.output_compression_level 5

# The following directives stop screen flicker in IE on CSS rollovers. If
# needed, un-comment the following rules. When they're in place, you may have
# to do a force-refresh in order to see changes in your designs.

#ExpiresActive On
#ExpiresByType image/gif A2592000
#ExpiresByType image/jpeg A2592000
#ExpiresByType image/png A2592000
#BrowserMatch "MSIE" brokenvary=1
#BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
#BrowserMatch "Opera" !brokenvary
#SetEnvIf brokenvary 1 force-no-vary

[/SPOILER]

siv1987
На сайте с 02.04.2009
Offline
427
#3

Добавить ПОСЛЕ RewriteBase

RewriteRule ^one-url\.html http://site.ru/? [R=301,L]

RewriteRule ^two-url\.html http://site.ru/? [R=301,L]

старые редиректы удалить

G
На сайте с 01.09.2010
Offline
49
#4

siv1987, помогло! Спасибо вам огромное!

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