parser

Написать ответ на текущее сообщение

 

 
   команды управления поиском

RewriteRules - что у меня не так?

Sanja v.2 29.08.2003 12:45

Решил написать кучу редиректов со старых адресов, а они не работают. Подскажите, где ошибки?
RewriteEngine on

# Rewrites http://www.gfk.ru/old_stuff/ --> /new_stuff/:

RewriteRule ^/ru/marketing/conference/archive/([0-9]+)\.html$ http://forum.gfk.ru/forum/message_$1.html?setdesign=new&comefrom=oldforum [G,L]
RewriteRule ^/ru/marketing/conference/conference\.html$ http://forum.gfk.ru/forum/?setdesign=new&comefrom=oldforum [G,L]
RewriteRule ^/ru/marketing/conference/index\.html$ http://forum.gfk.ru/forum/?setdesign=new&comefrom=oldforum [G,L]
RewriteRule ^/ru/marketing/conference/messages/([0-9]+)\.html$ http://forum.gfk.ru/forum/message_$1.html?setdesign=new&comefrom=oldforum [G,L]
RewriteRule ^/ru/marketing/con(.*) http://forum.gfk.ru/forum/?setdesign=new&comefrom=oldforum [G,L]

RewriteRule ^/de/ /en/ [G,R,L]
RewriteRule ^/ru/search/index\.html /search/ [G,R,L]
RewriteRule ^/news_r\.htm /news/ [G,R,L]
RewriteRule ^/ru/konfa/ /news/ [G,R,L]
RewriteRule ^/ru/konfa/11\.html /news/ [G,R,L]
RewriteRule ^/ru/konfa/4\.html /news/ [G,R,L]
RewriteRule ^/ru/marketing/conjoint\.html /mr/ [G,R,L]
RewriteRule ^/ru/marketing/focus\.html /mr/ [G,R,L]
RewriteRule ^/ru/marketing/gloss\.html /mr/ [G,R,L]
RewriteRule ^/ru/marketing/index\.html /mr/ [G,R,L]
RewriteRule ^/ru/marketing/library\.html /mr/ [G,R,L]
RewriteRule ^/ru/marketing/method\.html /mr/ [G,R,L]
RewriteRule ^/ru/marketing/price\.html /mr/ [G,R,L]
RewriteRule ^/ru/marketing/segment\.html /mr/ [G,R,L]
RewriteRule ^/en/sitemap\.html /en/sitemap/ [G,R,L]
RewriteRule ^/en/company/group\.html /en/about/worldwide/ [G,R,L]
RewriteRule ^/en/company/vacancy\.html /en/about/vacancies/ [G,R,L]
RewriteRule ^/en/company/tools/tools\.html /en/about/tools/ [G,R,L]
RewriteRule ^/en/company/department\.html /en/about/structure/ [G,R,L]
RewriteRule ^/en/company/desk16\.html /en/about/structure/ [G,R,L]
RewriteRule ^/en/company/desk17\.html /en/about/structure/ [G,R,L]
RewriteRule ^/en/company/desk18\.html /en/about/structure/ [G,R,L]
RewriteRule ^/en/company/desk19\.html /en/about/structure/ [G,R,L]
RewriteRule ^/en/company/desk20\.html /en/about/structure/ [G,R,L]
RewriteRule ^/en/company/desk21\.html /en/about/structure/ [G,R,L]
RewriteRule ^/en/company/GeoIr_eng\.doc /en/about/structure/ [G,R,L]
RewriteRule ^/en/company/greeting\.html /en/about/foreword/ [G,R,L]
RewriteRule ^/en/company/about\.html /en/about/ [G,R,L]
RewriteRule ^/en/company/p6\.html /en/about/ [G,R,L]
RewriteRule ^/en/index\.html /en/ [G,R,L]
RewriteRule ^/en/investigations\.html /en/ [G,R,L]
RewriteRule ^/en/market\.html /en/ [G,R,L]
RewriteRule ^/en/marketing/index\.html /en/ [G,R,L]
RewriteRule ^/en/search/search\.html /en/ [G,R,L]
RewriteRule ^/index_e\.html /en/ [G,R,L]
RewriteRule ^/ru/company/group\.html /about/worldwide/ [G,R,L]
RewriteRule ^/ru/company/tools/ats\.html /about/tools/ats/ [G,R,L]
RewriteRule ^/ru/company/tools/optimizer\.html /about/tools/ [G,R,L]
RewriteRule ^/ru/company/tools/pharma03\.html /about/tools/ [G,R,L]
RewriteRule ^/ru/company/tools/price\.html /about/tools/ [G,R,L]
RewriteRule ^/ru/company/tools/target\.html /about/tools/ [G,R,L]
RewriteRule ^/ru/company/vacancy\.html /about/tools/ [G,R,L]
RewriteRule ^/ru/company/nonfood\.html /about/structure/nonfood/ [G,R,L]
RewriteRule ^/ru/company/media\.html /about/structure/media/ [G,R,L]
RewriteRule ^/ru/vciom/index\.html /about/structure/media/ [G,R,L]
RewriteRule ^/ru/company/p1\.html /about/structure/healthcare/ [G,R,L]
RewriteRule ^/ru/company/p2\.html /about/structure/healthcare/ [G,R,L]
RewriteRule ^/ru/company/p4\.html /about/structure/healthcare/ [G,R,L]
RewriteRule ^/ru/company/p6\.html /about/structure/healthcare/ [G,R,L]
RewriteRule ^/ru/company/p7\.html /about/structure/healthcare/ [G,R,L]
RewriteRule ^/ru/company/pharma\.html /about/structure/healthcare/ [G,R,L]
RewriteRule ^/ru/company/field\.html /about/structure/field/ [G,R,L]
RewriteRule ^/ru/company/consumer01\.html /about/structure/consumertracking/ [G,R,L]
RewriteRule ^/ru/company/consumer02\.html /about/structure/consumertracking/ [G,R,L]
RewriteRule ^/ru/company/consumer03\.html /about/structure/consumertracking/ [G,R,L]
RewriteRule ^/ru/company/fmcg\.html /about/structure/adhoc/fmcg/ [G,R,L]
RewriteRule ^/ru/company/fmcg01\.html /about/structure/adhoc/fmcg/ [G,R,L]
RewriteRule ^/ru/company/b2b\.html /about/structure/adhoc/b2b/ [G,R,L]
RewriteRule ^/ru/company/adhok\.html /about/structure/adhoc/ [G,R,L]
RewriteRule ^/ru/company/desk12\.html /about/structure/ [G,R,L]
RewriteRule ^/ru/company/desk14\.html /about/structure/ [G,R,L]
RewriteRule ^/ru/company/desk15\.html /about/structure/ [G,R,L]
RewriteRule ^/ru/company/desk16\.html /about/structure/ [G,R,L]
RewriteRule ^/ru/company/desk18\.html /about/structure/ [G,R,L]
RewriteRule ^/ru/company/desk20\.html /about/structure/ [G,R,L]
RewriteRule ^/ru/company/desk21\.html /about/structure/ [G,R,L]
RewriteRule ^/ru/company/desk7\.html /about/structure/ [G,R,L]
RewriteRule ^/ru/company/greeting\.html /about/foreword/ [G,R,L]
RewriteRule ^/index\.html / [G,R,L]
RewriteRule ^/present/MRtarget\.doc / [G,R,L]
RewriteRule ^/ru/index\.html / [G,R,L]
RewriteRule ^/ru/investigations\.html / [G,R,L]
RewriteRule ^/1\.swf /404/ [G,R,L]
RewriteRule ^/img/1p\.gif /404/ [G,R,L]
RewriteRule ^/img/bgd3\.jpg /404/ [G,R,L]
RewriteRule ^/img/blank_dot\.gif /404/ [G,R,L]
RewriteRule ^/img/bracket_bottom\.jpg /404/ [G,R,L]
RewriteRule ^/img/bracket_bottom2\.jpg /404/ [G,R,L]
RewriteRule ^/img/bracket_left\.jpg /404/ [G,R,L]
RewriteRule ^/img/bracket_right\.jpg /404/ [G,R,L]
RewriteRule ^/img/front_ser\.jpg /404/ [G,R,L]
RewriteRule ^/img/logo\.gif /404/ [G,R,L]
RewriteRule ^/library/default\.css /404/ [G,R,L]
RewriteRule ^/ru/konfa/6_1\.jpg /404/ [G,R,L]
RewriteRule ^/ru/konfa/6_2\.jpg /404/ [G,R,L]
RewriteRule ^/ru/konfa/6_3\.jpg /404/ [G,R,L]
RewriteRule ^/ru/konfa/cd_med_wte-1\.gif /404/ [G,R,L]
RewriteRule ^/ru/marketing/doc/cee_review\.pdf /404/ [G,R,L]

# This disables URI rewriting for non-HTML files:
RewriteRule (gif|jpg|js|css|exe|zip|rar|pdf|doc|xls|ppt|swf|ipx|txt|xslt|xsl|tif|eps|tiff|ico|ent|chm|cfm|gz)$ - [L]

# ...and for /admin/ section: 

RewriteRule ^/admin/ [L]

# Special rules for news:
RewriteCond %{REQUEST_URI} ^/news/press_.+/$
RewriteRule ^(.+)/press_([0-9]+)/$	 $1/press/?id=$2 [PT,QSA]
RewriteCond %{REQUEST_URI} ^/news/pr_.+/$
RewriteRule ^(.+)/pr_([0-9]+)/$	 $1/pr/?id=$2 [PT,QSA]
RewriteCond %{REQUEST_URI} ^/en/news/press_.+/$
RewriteRule ^(.+)/press_([0-9]+)/$	 $1/press/?id=$2 [PT,QSA]
RewriteCond %{REQUEST_URI} ^/en/news/pr_.+/$
RewriteRule ^(.+)/pr_([0-9]+)/$	 $1/pr/?id=$2 [PT,QSA]

# All requests to unexisting pages will be forwarded to a single 
# 'main' page transparently - if the user will ask for
# /en/about/company/index.html the request will be transformed
# to index.html?uri=/en/about/company/index.html (invisibly for
# the site visitor) 

# The following tells RewriteEngine what to do with 'virtual' requests:
RewriteCond	%{REQUEST_FILENAME}	!-f
RewriteCond	%{REQUEST_FILENAME}	!-d
RewriteRule	^(.*)$        /index.html?type=via_rewrite&uri=/$1 [L,QSA]

# This disables Russian Apache (if running):

<IfModule mod_charset.c>
CharsetDisable On
</IfModule>

# /404/ will process all unsuccessful page requests (Error 404 etc):

ErrorDocument 300 /404/?e=300
ErrorDocument 400 /404/?e=400
ErrorDocument 401 /404/?e=401
ErrorDocument 402 /404/?e=402
ErrorDocument 403 /404/?e=403
ErrorDocument 404 /404/?e=404
ErrorDocument 405 /404/?e=405
ErrorDocument 406 /404/?e=406
ErrorDocument 408 /404/?e=408
ErrorDocument 413 /404/?e=413
ErrorDocument 414 /404/?e=414
ErrorDocument 500 /404/?e=500
ErrorDocument 505 /404/?e=505


# EOF