| Nginx-ru mailing list archive (nginx-ru@sysoev.ru) [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
 Re: Mod_rewrite
 
 On Tue, Oct 23, 2007 at 02:02:56AM +0400, Shestera S Leonid wrote:
> Здравствуйте.
> Момогите пожалуйста с решением вопроса по ngx_http_rewrite_module 
> <>
> 
> Есть исходный файл .htaccess
> AddType application/x-httpd-php .jpg .JPG
> RewriteEngine On
> RewriteBase /images/gallery
> RewriteRule ^set([0-9]{1,9})/full/image(.*)$ 
> image.php?cid=$1&type=full&file=$2
> RewriteRule ^set([0-9]{1,9})/small/image(.*)$ 
> image.php?cid=$1&type=small&file=$2
> RewriteRule ^set([0-9]{1,9})/thumb/image(.*)$ 
> image.php?cid=$1&type=thumb&file=$2
> 
> Пытаюсь сделать вот так
> 
> location ^~ /images/gallery {
>        root /var/www/html ;
>        include /etc/nginx/fastcgi.conf;
>        fastcgi_pass  127.0.0.1:9000;
>        fastcgi_index index.php;
>        types         { }
>        default_type  image/jpeg;
>        rewrite ^set([0-9]{1,9})/full/image(.*)$ 
> images/gallery/image.php?cid=$1&type=full&file=$2 last;
>        rewrite ^set([0-9]{1,9})/small/image(.*)$ 
> images/gallery/image.php?cid=$1&type=small&file=$2 last;
>        rewrite ^set([0-9]{1,9})/thumb/image(.*)$ 
> images/gallery/image.php?cid=$1&type=thumb&file=$2 last;
>        }
> 
> в ответ при запуске получаю
> [root@host ~]# nginx
> 2007/10/23 01:45:08 [emerg] 18459#0: directive "rewrite" is not 
> terminated by ";" in /etc/nginx/nginx.conf:67
> 
> Подскажите пожалуйста где я ошибся.
Плюс ко всему добавленому:
- images/gallery/image.php?cid=$1&type=full&file=$2 last;
+ /images/gallery/image.php?cid=$1&type=full&file=$2 last;
-- 
Игорь Сысоев
 |