Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Добрый день. помогоите п ожалуйста перевести рев райты с apache
On Fri, Feb 19, 2010 at 04:27:16PM +0200, в?тал?к Кор wrote:
> RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /images\.php\?path=ny\ HTTP/
> RewriteRule ^images\.php$ /en/categories/view/name/ny [R=301,L]
> RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /images\.php\?path=celebrities> HTTP/
> RewriteRule ^images\.php$ /en/categories/view/name/celebrities [R=301,L]
> RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /images\.php\?path=3d\ HTTP/
> RewriteRule ^images\.php$ /en/categories/view/name/3d-graphics [R=301,L]
> RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /images\.php\?path=nature\ HTTP/
> RewriteRule ^images\.php$ /en/categories/view/name/nature [R=301,L]
Это, не побоюсь этого слова, шедевр.
Всякие rewrite'ы видывал, но тут люди постарались от души.
location = /images.php {
if ($arg_path ~ "^(ny|celebrities|nature)$") {
rewrite ^ /en/categories/view/name/$arg_path permanent;
}
if ($arg_path = 3d) {
rewrite ^ /en/categories/view/name/3d-graphics permanent;
}
}
--
Игорь Сысоев
http://sysoev.ru
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
|