Rewrite rules for "random" subfolders

Anoop Alias anoopalias01 at
Sat Aug 15 07:45:35 UTC 2015

Try the below one in the server context ..outside all location blocks. You
can enable dedug log and do rewrite_log on; to see if its matching etc.
Good Luck!

rewrite ^/galleries/album-set/album-2/(.*)-single\.php
 /galleries/album-set/album-2/single.php?id=$1 last;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list