how to match these urls?

Igor Sysoev igor at sysoev.ru
Sun Aug 15 21:31:04 MSD 2010


On Sun, Aug 15, 2010 at 06:45:09AM -0700, kevin wrote:

> > Sorry, the slashes should be escaped, this is working configuration:
> >
> >        location ^~ /\\"http:\\/\\/ {
> >            return 404;
> >        }
> >
> > "^~" is to disable regex locations.
> >
> thanks a lot! this catches it and returns 404!
> 
> is it possible to customize the 404 message for this location?
> thanks!

     location ^~ /\\"http:\\/\\/ {
         return 404;
         error_page  404  /bad.html;
     }

     location = /bad.html {
         root  /path/to/page;
     }


-- 
Igor Sysoev
http://sysoev.ru/en/



More information about the nginx mailing list