| | |
Redirecting images depending on the page they are displayed on.
![]() |
•
•
Join Date: Nov 2004
Posts: 1
Reputation:
Solved Threads: 0
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
Can anyone help with my RewriteCond ? I'm not even sure what I'm trying is possible.
Thanks !! :o
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
![]() |
Similar Threads
- The Page Cannot Be Displayed Error (Web Browsers)
- Help me! "this page cannot be displayed" (Viruses, Spyware and other Nasties)
- IE "Page Cannot Be Displayed" Spyware? (Viruses, Spyware and other Nasties)
- "page cannot be displayed" only w/ router (Networking Hardware Configuration)
- Diggler: Page cannot be displayed (Web Browsers)
- Two Problems- "Page Cannot Be Displayed" Errors, Z (Windows NT / 2000 / XP)
Other Threads in the Linux Servers and Apache Forum
- Previous Thread: mod_rewrite: help with regular expressions
- Next Thread: Static WAn ip
| Thread Tools | Search this Thread |
Tag cloud for Linux Servers and Apache
.net amazon apache apple asus bbc bluegene centos cisco citrix cloud cloudcomputing code datacenters debian dell desktops development distributions distros drivers economy energy enterprise fedora fsf gadgets gentoo gnu government gpl hardware hp hyper-v ibm jobs kindle knoppix kundra kvm laptop laptops lawsuits ldap licensing limo linux linuxfoundation linuxmagazine magazines microsoft mobile mobilephones netbook netbooks news novell olpc open openmoko openoffice opensolaris opensource opensuse openvz operatingsystems os patents pc pcworld plathome print qumranet redhat rhel robot russia sco server servers slackware software solaris source stallman sun supercomputer support tivo torvalds training tv ubuntu unix virtualization vmware windows x86 xandros xen





