I am using the PHPAutoGallery module that contains the following modrewrite directives:
- Code: Select all
RewriteCond %{REQUEST_URI} !.*__phpAutoGallery/wrapper\.php.*
RewriteRule .* /gallery/__phpAutoGallery/wrapper.php [NE,QSA,L]
This works perfectly - when users go to my "gallery" subdirectory, they are redirected to the PHPAutogallery generated thumbnail display page. It's great!
The only problem is that I want to be able to display some of these images from another page in my site without having to upload the images to more than one directory. So, I would like a rule that does this:
If the request comes from a particular page or subdirectory within my site ("/blog/" or "/blog/index.php") then allow the image to be displayed without the redirect. Otherwise, redirect to the image gallery wrapper script as the existing modrewrite rules already do.
Hopefully this makes sense. I've tried many different things, but I'm pretty new to using modrewrite. Any help will be appreciated.
Thanks!
- Don