Forum: NGINX url rewrite help - is this possible

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
on 2009-04-05 23:50
(Received via mailing list)
if i get a url like this

will nginx be able to rewrite the url to:

if so how can i do it?
thansk a lot!!
Michael S. (Guest)
on 2009-04-05 23:58
(Received via mailing list)
rewrite ^/(\d+)/(.+) /$2?id=$1 last;

more or less. although you'd probably want to make it /123456/xxxx/ -
without the delimiter the url can be anything really.
on 2009-04-06 00:04
(Received via mailing list)
Hi Michael,
Thanks a lot for this. Yes you are right, i think i need this

in that case, is the following correct?

rewrite ^/(\d+)/(.+)/ /$2?id=$1 last;

can you explain what the word last means?
thanks a lot!
Michael S. (Guest)
on 2009-04-06 00:20
(Received via mailing list)
means it will not process any further rewrites
This topic is locked and can not be replied to.