Forum Moderators: phranque
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 [mysite...] But, i have a script called showphoto.php?photoid=filename. When user enters this, he should be able to see desired photo. Thank You very much.
Cheers,
Martin.
Welcome to WebmasterWorld!
We'll need more information on how this works, and why it makes a difference what URL is used.
For example, would it help to simply rewrite the http://example.com/photos/filename to your script URL at /showphoto.php?photoid=filename?
Also, does the script "include" the image and send it to the user, or does it create an HTML page which contains a standard <img src="/photos/image.jpg"> tag?
A more general, but possibly useful question is, "What is the purpose of making this change?"
The solution, as always, depends on the details. The better you describe what you are trying to accomplish or to avoid, the better the responses here will be.
Jim
It's a photo sharing script. Some of photos could be seen by anyone, and some of them not, depends from setting stored in MySql. So user should not be able to enter direct URL to the picture and see it.
I tried rewrite url to get.php?photo= but it does,'t work, i use HTML generation via <img src=" etc.
Thanks.