Image Gallery rewrite question

New to mod_rewrite? This is a good place to start.

Image Gallery rewrite question

Postby dahoule » Mon Apr 03, 2006 6:43 am

I searched for an answer that fits my situation, but couldn't find anything, so here goes:

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
dahoule
 
Posts: 1
Joined: Mon Apr 03, 2006 6:28 am

Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 30 guests

cron