strange if
Michael Shadle
mike503 at gmail.com
Thu May 20 20:33:04 MSD 2010
Push that complexity into the app level. Don't let the webserver
config get overly complex :)
On May 20, 2010, at 6:29 AM, Daniele Melosi <ml at melosi.it> wrote:
> Hi all,
>
> i'm taking in charge a new nginx cluster with a very strange
> configurations.
>
> I'm trying rewriting the configuration and i'm unable to find a way to
> better write this if condition:
>
> if ($request_uri !~*
> (^/$|^\/ajax\.php\?type=counter&op=blog&blog(_id|)=.*$.*$|^/\?nl_id=
> [0-9]+|\?from=[0-9]+|\?confirmkey=.*$|^/post/([0-9]+)(\?[0-9]+|)
> (\/.*|#.*|\?confirmkey=.*|)$|/post/comment/(saved|close)/([0-9]+)(/
> [0-9]+|)(\?blog=.*|)$|/permalink/([0-9]+)\.html(#.*)$|/archive/[0-9]
> [0-9][0-9][0-9]-[0-9][0-9]$|/tag(.*|)$|/member/[0-9]+$|/(media|album)
> (|/[0-9]+\?from=[0-9]+|/[0-9]+)$|/user(.*|)$|/blog|/sitemap(.xml|)|/
> images/smiley/rhymbox-(.*)/(.*)\.(gif|jpg|png)$|^/[0-9]+$|\?timer=1|
> check_login\?destination=.*|\?nocache=1))
> {
> error_page 404 /splinder_404.html;
> return 404;
> }
>
> Can it be translated on a location (note the negative !~*).
>
> Thanks in advance
>
> Daniele
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
More information about the nginx
mailing list