Mod Rewrite Question
My question is actually rather simple and relates to mod_rewrite (one of the most useful but most poorly documented features of apache).
Basically, I am using standard rewrite code in the hopes of making any image when called on its own (not inside a page) display my rewrite rule (a special page).
So far the best I've been able to do is find the Rewrite Condition
RewriteCond %{REQUEST_FILENAME} which displays data about the requested file name (I had tried REQUEST_URI but every request falls subject to that even when called within an image).
As far as I can tell, REQUEST_FILENAME should do the trick, but I can not for the life of me figure out the proper syntax to get it working or even tell if it will do what I need.
So, if you have any ideas or tips for how to use mod rewrite to take an image called separate from any file and send it to a rewrite rule, please help. Below is the code I am working with:
[code]
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.extremefactor.com.com/.*$ [NC]
RewriteCond %{REQUEST_FILENAME} ????
RewriteRule .*\.(gif|GIF|jpg|JPG)$ http://
Ted S
Orpheus posted this at 19:25 — 21st August 2000.
They have: 568 posts
Joined: Nov 1999
aummm errr....
i have no idea
http://www.perlmonks.org should have an answer to your question.
i can't believe i dont know this!
Ted S posted this at 19:26 — 21st August 2000.
They have: 92 posts
Joined: May 1999
Hum.... can clue what I should look for there?
Orpheus posted this at 19:32 — 21st August 2000.
They have: 568 posts
Joined: Nov 1999
just search for it, you'll find it if it's in their database.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.