I would like to use a special PHP script to display my picture. So I want a redirection like :
/photos/photofile.jpg --> openpic.php?dir=photos&file=photofile.jpg
The problem is, when I try to display the picture on the openpic page, it is of course redirected and thus cannot be displayed (infinite redirection).
My question is, I would like to redirect the images to the Php script, but not when they are displayed on a certain page (the php script). Is that possible ?
I have tried :
- Code: Select all
RewriteCond %{SCRIPT_NAME} !/openpic\.php [NC]
RewriteRule the_redirection_rule
but that does not work...
I have also tried to replace SCRIPT_NAME by REQUEST_URI but it does not work either. Any solution ?
Thank you !
Peutch