Redirecting images depending on the page they are displayed on.

Reply

Join Date: Nov 2004
Posts: 1
Reputation: Peutch is an unknown quantity at this point 
Solved Threads: 0
Peutch Peutch is offline Offline
Newbie Poster

Redirecting images depending on the page they are displayed on.

 
0
  #1
Nov 29th, 2004
Hi everyone,
I would like to redirect my images to a php page so they'd be nicely displayed and I could track their frequentation. Let's say my display page is called openpic.php

The problem is, if I put an htaccess simple RewriteRule, all images will be subject to redirection, including the one that is displayed on openpic.php, thus creating a loop. (The image then appears as not available.)

My question is : I would like to redirect my images, except when they are displayed on openpic.php

Is that possible ?
I have tried a RewriteCond with HTTP_REFERER or REQUEST_URI but it does not seem to work. Maybe I got it wrong. I tried something like
RewriteCond %{HTTP_REFERER} !/openpic.php
RewriteRule [blabla.jpg -> openpic.php?file=blabla.jpg]

Can anyone help with my RewriteCond ? I'm not even sure what I'm trying is possible.

Thanks !! :o
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Linux Servers and Apache Forum
Thread Tools Search this Thread



Tag cloud for Linux Servers and Apache
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC