Welcome! Log In Create A New Profile

Advanced

Re: Best way to get the $request_uri without the starting slash

December 20, 2011 04:36AM
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;
}
Subject Author Posted

Best way to get the $request_uri without the starting slash

Matthew Ward December 19, 2011 04:56AM

Re: Best way to get the $request_uri without the starting slash

Valentin V. Bartenev December 19, 2011 06:08AM

Re: Best way to get the $request_uri without the starting slash

WheresWardy December 20, 2011 04:36AM

Re: Best way to get the $request_uri without the starting slash

Igor Sysoev December 20, 2011 04:46AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 295
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready