GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   htaccess question (https://gfy.com/showthread.php?t=482201)

darnit 06-18-2005 12:43 AM

htaccess question
 
Hi,

This is probably a pretty stupid question for those technically minded. But here it goes.

I have a folder of thumbs that I dont want to be available unless opened within an HTML page. Is there a way to modify my htaccess file so the thumbs can not be seen unless loaded within an .html file or opened directy by going to the .jpg directly?

Thanks in advance.

aico 06-18-2005 12:44 AM

just put a blank file in there and name it index.html

darnit 06-18-2005 12:47 AM

Quote:

Originally Posted by aico
just put a blank file in there and name it index.html

Yes but that still wont stop those who access the .jpg file directly. Basically I dont want the file to load unless from a page. However I do have other graphics that need to load on the domain so im seeking a solution for a specific directory behavior regarding images.

aico 06-18-2005 12:50 AM

Quote:

Originally Posted by darnit
... so the thumbs can not be seen unless loaded within an .html file or opened directy by going to the .jpg directly?

Sorry, I gave you the solution for what you asked...

broke 06-18-2005 12:53 AM

RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ site.info.here [R,NC]

kernelpanic 06-18-2005 12:55 AM

Are you looking to stop hotlinking, or type-ins of the jpeg? If your goal is to stop the latter, I urge you to reconsider. When someone "accesses it directly", no referer headers are sent to the server with the HTTP request.

Why would this be problematic? Many surfers use privacy products, at browser, system, or firewall level that block the sending of HTTP referer headers. Thus, direct access would be indistinguishable from one of those "enhanced privacy" pieces of software.

Why is direct access such a problem? If they can't browse the directory, and don't know image names, then how is it a problem?

darnit 06-18-2005 01:04 AM

Quote:

Originally Posted by kernelpanic
Are you looking to stop hotlinking, or type-ins of the jpeg? If your goal is to stop the latter, I urge you to reconsider. When someone "accesses it directly", no referer headers are sent to the server with the HTTP request.

Why would this be problematic? Many surfers use privacy products, at browser, system, or firewall level that block the sending of HTTP referer headers. Thus, direct access would be indistinguishable from one of those "enhanced privacy" pieces of software.

Why is direct access such a problem? If they can't browse the directory, and don't know image names, then how is it a problem?

Actually its because of 2257. I have ton of fake tgps that use remote thumbs. They have all been coverted to text links. I want to continue to use their listings however the program errors out if it cant upload thumbs to my server. So by disabling thumbs from being "available" to the web unless loaded in a page there is a reduced risk. Paranoid = yes.

kernelpanic 06-18-2005 01:08 AM

Quote:

Originally Posted by darnit
Actually its because of 2257. I have ton of fake tgps that use remote thumbs. They have all been coverted to text links. I want to continue to use their listings however the program errors out if it cant upload thumbs to my server. So by disabling thumbs from being "available" to the web unless loaded in a page there is a reduced risk. Paranoid = yes.

Ohh, so it is about remote linking then.


You'll want to use mod_rewrite
http://httpd.apache.org/docs/mod/mod_rewrite.html



it will look something like this:
Code:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_REFERER} !^http://www.pornosite.com [NC,OR]
RewriteCond %{HTTP_REFERER} !^http://pornosite.com [NC]
RewriteRule [^/]+.(jpg|jpeg|gif|png)$ - [NC,F,L]


darnit 06-18-2005 01:13 AM

Just what i needed...

Thanks broke and kernel.... everyone please click on their sigs :winkwink:


All times are GMT -7. The time now is 07:11 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123