Rewriting for revisioned URLs

Jauder Ho lists at ruby-forum.com
Thu May 21 21:00:11 MSD 2009


Brian Kirkbride wrote:

> 
> 
> location ~ ^/r[0-9]+ {
>      if ( $uri ~ ^/r([0-9]+)(/.*)$ ) {

> Thanks in advance!

Your regex is bad and is trying to match from the beginning of the 
string. Try /r([0-9]+)(/.*)$ instead.

Check it with http://www.regextester.com/



-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list