<p dir="ltr">Hi,</p>
<p dir="ltr">Does this work?<br>
rewrite ^(.*)/(.*)-single\.php $1/single. php?id=$2 last;</p>
<p dir="ltr">Not tested, so anything could happen.</p>
<br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 14, 2015, 18:22 Muffel2k <<a href="mailto:nginx-forum@nginx.us">nginx-forum@nginx.us</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey,<br>
<br>
I would like to migrate my page from a webhoster to my own vServer running<br>
Nginx. So far I got everything up and running EXCEPT these stupid .htaccess<br>
file. Let me explain:<br>
<br>
My site contains several galleries with slideshows. When you are watching<br>
one of those you click a link which looks like this<br>
<br>
"DOMAIN/galleries/album-set/album-2/DSC01154-single.php"<br>
<br>
(only DOMAIN/galleries and -single.php) are fixed. The rest can vary. Those<br>
links are generated by Lightroom and a plugin and during this process a<br>
.htaccess file will be copied into each folder. The content looks like<br>
this:<br>
<br>
<IfModule mod_rewrite.c><br>
RewriteEngine On<br>
RewriteRule ^(.*)-single.*php$ single.php?id=$1 [L]<br>
</IfModule><br>
<br>
This makes my link<br>
DOMAIN/galleries/album-set/album-2/DSC01154-single.php<br>
point to this<br>
DOMAIN/galleries/album-set/album-2/single.php?id=DSC01154<br>
<br>
as you can see, the "DSC01154" will be passed through. I am trying for<br>
several days to create a rewrite rule for Nginx doing the same without<br>
killing my page.<br>
<br>
Does anyone knows a solution for this?<br>
<br>
Posted at Nginx Forum: <a href="http://forum.nginx.org/read.php?2,261008,261008#msg-261008" rel="noreferrer" target="_blank">http://forum.nginx.org/read.php?2,261008,261008#msg-261008</a><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div>