Block direct image loads but allow them in PHP
| From: | Michael Mulligan | Date: | Sat, 15 Feb 2003 16:00:13 +0000 |
| Subject: | Block direct image loads but allow them in PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-135670@lists.php.net to get a copy of this message | ||
Hi
I have a bit of a problem which might just be due to my lack of knowledge
with Apache. Basically, what I want to do is to *not* allow users to enter
particular URLs in their browser (namely to *.jpg and *.xml files under a
particular directory, let's call it "imagesDir"). However, I can't simply
Deny all or stick a .htaccess in the folder because I *do* want these images
to load from within a particular PHP file I have coded.
I originally thought that I could stick a .htaccess file in the images
folder and just set the AUTH_USER sort of variables from within the PHP but
that didn't work--it still prompted me for a login (understandably so, but
worth a try). I have also tried to see about modifying my httpd.conf file,
but I'm afraid I'm not terribly knowledgable in this area. :-/
Any suggestions?
Also, in case it matters, I'm running Apache on Mac OS X.
Thanks in advance!
-m^2
__________
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me
spread!
__________