Welcome!
Log In
Create A New Profile
Home
>
Mailing Lists
>
Nginx Mailing List - English
> Topic
Advanced
Re: Best way to get the $request_uri without the starting slash
Previous Message
Next Message
Forum List
Message List
New Topic
Print View
WheresWardy
December 20, 2011 04:36AM
Registered: 12 years ago
Posts: 7
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;
}
Reply
Quote
RSS
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: 315
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018