Rewrite rules for "random" subfolders
ryd994 at 163.com
Fri Aug 14 17:21:33 UTC 2015
Does this work?
rewrite ^(.*)/(.*)-single\.php $1/single. php?id=$2 last;
Not tested, so anything could happen.
On Fri, Aug 14, 2015, 18:22 Muffel2k <nginx-forum at nginx.us> wrote:
> I would like to migrate my page from a webhoster to my own vServer running
> Nginx. So far I got everything up and running EXCEPT these stupid .htaccess
> file. Let me explain:
> My site contains several galleries with slideshows. When you are watching
> one of those you click a link which looks like this
> (only DOMAIN/galleries and -single.php) are fixed. The rest can vary. Those
> links are generated by Lightroom and a plugin and during this process a
> .htaccess file will be copied into each folder. The content looks like
> <IfModule mod_rewrite.c>
> RewriteEngine On
> RewriteRule ^(.*)-single.*php$ single.php?id=$1 [L]
> This makes my link
> point to this
> as you can see, the "DSC01154" will be passed through. I am trying for
> several days to create a rewrite rule for Nginx doing the same without
> killing my page.
> Does anyone knows a solution for this?
> Posted at Nginx Forum:
> nginx mailing list
> nginx at nginx.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nginx