|
|
#1 (permalink) |
|
Registered User
Comfy Contributor
Joined in Jun 2005
Lives in Singapore
Hosted on Pass15
100 posts
Gave thanks: 2
Thanked 0 times
|
probably an .htaccess question about images
I observed on some sites where they have an image displayed in an HTML page, which, on right click > properties > Address (URL) will show eg. http://www.surpasshosting.com/image/animal.jpg
however, if i keyed that URL into the address bar, I will be redirected to the same HTML page. and If i try to "save picture as", i will be saving the HTML file instead. In short, this prevents people from stealing images directly. Indirectly, people can print screen if they are desperate or maybe the temporary files folder may have a copy of the image, which i am not sure (someone tell me pls). How can I implement this? Thanks! |
|
|
|
|
|
#2 (permalink) |
|
Staff of Surpass
Super #1
Joined in Apr 2007
2,343 posts
Gave thanks: 98
Thanked 151 times
|
Is it one of those scripts where no matter what image you try to save it saves it as image.php instead?
Also, do you have an example page I could see? I've seen some like this before where it named it image.php and I would just rename the file image.jpg on my computer and it let me view the image heh ![]()
__________________
|
|
|
|
|
|
#3 (permalink) |
|
Registered User
Comfy Contributor
Joined in Jun 2005
Lives in Singapore
Hosted on Pass15
100 posts
Gave thanks: 2
Thanked 0 times
|
I dont have an example now, but the script is smarter than the one you described.
suppose the setup at surpasshosting.com is as such: Inside webpage a.html: <center><img src="http://www.surpasshosting.com/a.jpg"/></center> Inside webpage b.html: <center><img src="http://www.surpasshosting.com/b.jpg"/></center> Inside webpage c.html: <center><img src="http://www.surpasshosting.com/c.jpg"/></center> etc... each only has an enlarged version of the image. then to view the image a.jpg, the URL will be http://surpasshosting.com/a.html OR http://surpasshosting.com/a.jpg. For the latter case, we get redirected to the former URL. Thus we must be at the former URL to see the image. If we try to "save picture as", we will end up saving a.html with the HTML in the document. Renaming the extension wont help. try this for the other pages and you get the same results. i know it's possible to write .htaccess to manipulate the URL or redirect, but I just don't know how to do it, and if possible, also intercept the image download. Last edited by JakeSee; May 3rd, 2008 at 1:58 PM. |
|
|
|