Welcome! Log In Create A New Profile


Rewrite rules for "random" subfolders

August 14, 2015 06:22AM

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 this:

<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?
Subject Author Posted

Rewrite rules for "random" subfolders

Muffel2k August 14, 2015 06:22AM

Re: Rewrite rules for "random" subfolders

ryd994 August 14, 2015 01:22PM

Re: Rewrite rules for "random" subfolders

Muffel2k August 14, 2015 02:33PM

Re: Rewrite rules for "random" subfolders

Anoop Alias August 15, 2015 03:46AM

Re: Rewrite rules for "random" subfolders

Muffel2k August 15, 2015 01:45PM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 50
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready