Re: помогите переделать правило rewrite

Denis Kot denis.kot at gmail.com
Fri May 16 16:29:40 MSD 2008


хм, вроде начало отрабатывать, но теперь в огнелисе предлагает
сохранить файл, а в IE возвращает код php.

16 мая 2008 г. 14:54 пользователь Denis Kot <denis.kot at gmail.com> написал:
> есть вот такой вот .htaccess
> RewriteRule ^([0123456789]*)-([0123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM_]*)\.png$
> torrentbar.php?id=$1&style=$2 [L]
> RewriteRule ^(.*)/([0123456789]*)-([0123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM_]*)\.png$
> torrentbar.php?id=$2&style=$3 [L]
>
> RewriteRule ^(.*)/([0123456789]*)\.png$ torrentbar.php?id=$2 [L]
> RewriteRule ^([0123456789]*)\.png$ torrentbar.php?id=$1 [L]
>
> попробывал сделать так:
>    location /forum/torrentbar/ {
>        rewrite
> ^/forum/torrentbar/([0123456789]*)-([0123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM_]*)\.png$
> /forum/torrentbar/torrentbar.php?id=$1&style=$2 break;
>        rewrite
> ^/forum/torrentbar/(.*)/([0123456789]*)-([0123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM_]*)\.png$
> /forum/torrentbar/torrentbar.php?id=$2&style=$3 break;
>    }
>
> в логах:
> 2008/05/16 16:48:01 [error] 8779#0: *15237 open()
> "/home/sites/site.by/www/forum/torrentbar/3-default_cyan.png" failed
> (2: No such file or directory), client: 1.2.22.22, server: site.by,
> URL: "/forum/torrentbar/3-default_cyan.png", host: "site.by"
> в браузере просто белая пустая страница
>
> --
> Denis Kot
> denis?jabber.org.by
> ICQ: 13680126
> Mobil: +375 29 6-1234-78
>



-- 
Denis Kot
denis?jabber.org.by
ICQ: 13680126
Mobil: +375 29 6-1234-78


More information about the nginx-ru mailing list