Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

htaccess&apache, need to protect pictures from being shown - URL

Status
Not open for further replies.

martinko86

Programmer
Mar 8, 2006
1
SK
Hi.

I have a tricky problem. I have a directory (say /photos/), where is few images (jpeg). I need to BLOCK users from being able to see images while entering But, i have a script called showphoto.php?photoid=filename. When user enters this, he should be able to see desired photo. The script showphoto generates html img src code. Thank You very much.

Cheers,
Martin.
 
You can use this directive either in an .htaccess file or in the directory container in httpd.conf:
Code:
Order allow, deny
Allow from [URL unfurl="true"]http://www.mydomain.com/myscript.php[/URL]

This will deny access to all by default but allow from this page only.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top