Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


   


   


   















      :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: error_page 404



On Tue, Apr 07, 2009 at 05:35:49PM +0400,  (YD -D) wrote:

>  ,
>  
>    ,     .
>  Nginx 0.7.47
>  
>         location ~* ^/informer/(.+)/([0-9]+)\.png$ {
>              expires 5h;
>              error_page 404 =
> http://www.site.ru/img_informer.php?v=$1&co_id=$2;
>         }
>  
>  ?

   .


-- 
 
http://sysoev.ru
Index: src/http/ngx_http_core_module.c
===================================================================
--- src/http/ngx_http_core_module.c     (revision 2004)
+++ src/http/ngx_http_core_module.c     (working copy)
@@ -3875,7 +3875,7 @@
     args.len = 0;
     args.data = NULL;
 
-    if (cv.lengths == NULL) {
+    if (cv.lengths == NULL && uri.data[0] == '/') {
         p = (u_char *) ngx_strchr(uri.data, '?');
 
         if (p) {
Index: src/http/ngx_http_special_response.c
===================================================================
--- src/http/ngx_http_special_response.c        (revision 2004)
+++ src/http/ngx_http_special_response.c        (working copy)
@@ -451,14 +451,14 @@
         return NGX_ERROR;
     }
 
-    if (err_page->value.lengths) {
-        ngx_http_split_args(r, &uri, &args);
+    if (uri.data[0] == '/') {
 
-    } else {
-        args = err_page->args;
-    }
+        if (err_page->value.lengths) {
+            ngx_http_split_args(r, &uri, &args);
 
-    if (uri.data[0] == '/') {
+        } else {
+            args = err_page->args;
+        }
 
         if (r->method != NGX_HTTP_HEAD) {
             r->method = NGX_HTTP_GET;


 




Copyright © Lexa Software, 1996-2009.