On Tue, Dec 20, 2011 at 04:36:49AM -0500, WheresWardy wrote:
> Thanks, that's exactly what I was looking for.
>
> The $1 didn't work however, nginx complained about it being an
> unreferenced variable, so I modified it to look like the examples in the
> documentation (maybe you can't reference pattern matches numerically
> like elsewhere in the config?):
>
> map $request_uri $request_key {
> default index;
> ~^/(?P<key>.+)$ $key;
> }
Yes, numeric references are not supported in map.
You can also change default to empty string:
map $request_uri $request_key {
default "";
~^/(?P<key>.+)$ $key;
}
--
Igor Sysoev
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx