icon Learn how to get the most out of Surmunity - read our forum tips here! | Welcome! Please register to access all of our features.
Old May 3rd, 2008, 10:37 AM   #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!
__________________
Regards,
Jake See
Pass15:
http://www.vuox.com
JakeSee is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old May 3rd, 2008, 1:38 PM   #2 (permalink)
Dan
Staff of Surpass
Super #1
 
Dan's Avatar
 
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
__________________
D4nz Net - Surpass Help Desk - NES Forever
Use the thanks button. It works!
AIM: dansorl
Dan is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old May 3rd, 2008, 1:55 PM   #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.
__________________
Regards,
Jake See
Pass15:
http://www.vuox.com

Last edited by JakeSee; May 3rd, 2008 at 1:58 PM.
JakeSee is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On