Russian Apache mailing list archive (apache-rus@lists.lexa.ru)
[Date Prev ][Date Next ][Thread Prev ][Thread Next ][Date Index ][Thread Index ]
Re: [apache-rus] CGI redirector vs. mod_rewrite
Vladimir Pastukhov wrote:
>
> Именно :) Тот вариант работает только в настройках сервера.
> А вот это должно железно работать ;) везде:
Еще небольшие исправления, чтобы действительно везде.
<IfModule mod_rewrite.c>
RewriteEngine On
<IfModule mod_charset.c>
#RewriteCond %{SERVER_PORT} !=80
RewriteCond %{LA-U:ENV:CHARSET_SERVER_PORT} !=80
RewriteRule .* - [skip=9]
RewriteRule .* /%{LA-U:ENV:CHARSET}/ [nosubreq]
RewriteRule ^/koi8-r/ /8100 [skip=5,nosubreq]
RewriteRule ^/windows-1251/ /8101 [skip=4,nosubreq]
RewriteRule ^/ibm866/ /8102 [skip=3,nosubreq]
RewriteRule ^/iso-8859-5/ /8103 [skip=2,nosubreq]
RewriteRule ^/x-mac-cyrillic/ /8104 [skip=1,nosubreq]
#RewriteRule .* /8105 [nosubreq]
RewriteRule .* %{REQUEST_URI} [skip=2,nosubreq]
RewriteRule ^/([^/]+) /$1 [redirect,nosubreq]
RewriteRule ^([^/]+://[^/:]+)(:[^/]*)?/([^/]+) $1:$3%{REQUEST_URI} [redirect=permanent,last,nosubreq]
</IfModule>
RewriteRule .* - [passthrough]
</IfModule>
--
Vladimir Pastukhov <vol@escortcorp.com>
Спонсоры сайта:
"Russian Apache" includes software developed
by the Apache Group for use in the Apache HTTP server project
(http://www.apache.org/) See
Apache LICENSE .
Copyright (C) 1995-2001 The Apache Group. All rights reserved.
Copyright (C) 1996 Dm. Kryukov; Copyright (C)
1997-2009 Alex Tutubalin . Design (C) 1998 Max Smolev.