Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 02-14-2005, 09:44 AM   #1
nico-t
emperor of my world
 
Join Date: Aug 2004
Location: nethalands
Posts: 29,903
htaccess in a folder

i got the root htaccess file blocking hotlinking now.
Now i want 1 folder on my site to not have this. BUT, that folder does have to block fusker shit and stuff.
My htaccess code in the root is ok now, so i thought i could get another htaccess file in the folder like this one:

RewriteEngine On
RewriteCond %{HTTP_REFERER} ^.*fusker*.*$ [NC]
RewriteCond %{HTTP_REFERER} ^.*usefulidiot*.*$ [NC]
RewriteRule \.(jpe?g|gif|bmp|png)$ des/test/hotlinkimg-d.gif [L]

But that doesnt work... Please someone give me a link about this or explain how i can do this, i searched google and i been searching for this whole afternoon and still found nothing i can use.
nico-t is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-14-2005, 09:59 AM   #2
swedguy
Confirmed User
 
Industry Role:
Join Date: Jan 2002
Posts: 7,981
http://www.htaccesstools.com/
swedguy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-14-2005, 10:58 AM   #3
nico-t
emperor of my world
 
Join Date: Aug 2004
Location: nethalands
Posts: 29,903
Quote:
Originally Posted by swedguy
thanks but that aint got the issue i got: setup specific htaccess options for a folder of my website.
nico-t is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-14-2005, 11:08 AM   #4
directfiesta
Too lazy to set a custom title
 
directfiesta's Avatar
 
Industry Role:
Join Date: Oct 2002
Location: Montreal, Quebec
Posts: 29,677
Aren't all subfolders subject to the " top " htaccess file ???

So you couldn;t be LESS restrictive, but MORE restrictive in subfolders....

????
__________________
I know that Asspimple is stoopid ... As he says, it is a FACT !

But I can't figure out how he can breathe or type , at the same time ....
directfiesta is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-14-2005, 11:12 AM   #5
jonesy
Confirmed User
 
jonesy's Avatar
 
Join Date: Jan 2003
Posts: 6,688
take the htaccess out of your root - drop it in the folder/s you want to protect

then drop the other htaccess file with the fusker url and drop that into the other folder you want to protect from fusker
__________________
.
Shooting Bikini Girls
jonesy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-14-2005, 11:17 AM   #6
nico-t
emperor of my world
 
Join Date: Aug 2004
Location: nethalands
Posts: 29,903
aha ! well i knew there was something about subfolders etc., i read it somewhere but didnt knew the site anymore... so thanks for the tips, im gonna try it right now.
nico-t is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-14-2005, 11:22 AM   #7
nico-t
emperor of my world
 
Join Date: Aug 2004
Location: nethalands
Posts: 29,903
fuck this is a lil more complicated then i thought... i have to think backwards and shit.. damn... testing some shit out now tho...
nico-t is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-14-2005, 11:26 AM   #8
Project-Shadow
Confirmed User
 
Industry Role:
Join Date: Feb 2003
Posts: 7,340
Place a blank .htaccess file in the folder you want no restrictions on.
Project-Shadow is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-14-2005, 11:31 AM   #9
swedguy
Confirmed User
 
Industry Role:
Join Date: Jan 2002
Posts: 7,981
Should work...

RewriteEngine On
RewriteCond %{HTTP_REFERER} ^.*fusker.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^.*usefulidiot.*$ [NC]
RewriteRule \.(jpe?g|gif|bmp|png)$ /test/hotlinkimg-d.gif [L]

There should be an OR in all the RewriteCond's except that last one.
swedguy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-14-2005, 11:50 AM   #10
nico-t
emperor of my world
 
Join Date: Aug 2004
Location: nethalands
Posts: 29,903
Quote:
Originally Posted by swedguy
Should work...

RewriteEngine On
RewriteCond %{HTTP_REFERER} ^.*fusker.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^.*usefulidiot.*$ [NC]
RewriteRule \.(jpe?g|gif|bmp|png)$ /test/hotlinkimg-d.gif [L]

There should be an OR in all the RewriteCond's except that last one.
this kinda misses the point im making i think? This has nothing to do with working with folders, this is just the code itself...
And the code itself is working, the OR in it doesnt matter... thanks ne way for you input hehe...

anyway, I think its working properly now... let me give u my site structure to show what ive done and what id like:

LEVEL 1 - ROOT FOLDER
htaccess file with only 404 and 403 redirection in it

LEVEL 2 - FOLDER 1, FOLDER 2, FOLDER 3
folder 1: htaccess with anti hotlinking from all sites
folder 2: htaccess with anti hotlinking from all sites
folder 3: htaccess without anti hotlinking, except fusker and usefulidiot

^^^ this seems to work, but that are alot htaccess files...


A question to Project-Shadow: so when i put the anti hotlink in the root again, and just a blank htaccess in 'folder 3', it accepts hotlinking from files in folder 3? But what if i only wanna block fusker in folder 3? Is there another way to do that then what i just did?
nico-t is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-14-2005, 12:00 PM   #11
swedguy
Confirmed User
 
Industry Role:
Join Date: Jan 2002
Posts: 7,981
Quote:
Originally Posted by nico-t
this kinda misses the point im making i think? This has nothing to do with working with folders, this is just the code itself...
You stick it IN the folder you are talking about (folder 3 according to your example)

Quote:
And the code itself is working, the OR in it doesnt matter... thanks ne way for you input hehe...
The OR matters a lot.
swedguy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-14-2005, 12:04 PM   #12
collegegirlvids
Confirmed User
 
Join Date: Oct 2004
Location: U of I
Posts: 535
I just use proxypass... they take care of everything and you don't have to do anything at all for $50 =)
collegegirlvids is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-14-2005, 12:10 PM   #13
swedguy
Confirmed User
 
Industry Role:
Join Date: Jan 2002
Posts: 7,981
Lets make a test. I have a folder open for all hotlinking, except from gfy.com.

You should see a pair of boobies below if you look at this thread from gofuckyourself.com


If you look at the same thread from gfy.com, you should see a pink Elephant

https://gfy.com/fucking-around-and-business-discussion/431645-htaccess-folder.html


EDIT: Remember to clear your cache, otherwise you will still see the boobs.

Last edited by swedguy; 02-14-2005 at 12:11 PM..
swedguy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-14-2005, 12:35 PM   #14
nico-t
emperor of my world
 
Join Date: Aug 2004
Location: nethalands
Posts: 29,903
Quote:
Originally Posted by swedguy
You stick it IN the folder you are talking about (folder 3 according to your example)


The OR matters a lot.
yes, im sorry i been working on this for the past 5 hours and im getting a lil slow and very irritated...

The good news from my other post that it works now is bullshit, i did a lil testing and its still fucked up.

I did see your test, with the boobies and the pink elephant. Im gonna change my file and test it later on, im gonna take a break now im kinda fed up with this shit...
thanks for your reply
nico-t is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-14-2005, 12:48 PM   #15
swedguy
Confirmed User
 
Industry Role:
Join Date: Jan 2002
Posts: 7,981
If it wasn't clear before, you will only get the pink elephant when the hotlink protection kicks in (for example from the fusker sites)

I used the same htaccess as I posted above.


What the OR does is exactly like in the English language.

If site is "fusker" OR "usefulidiot" OR "hotlinker2" OR "hotlinker3", redirect them to /test/hotlinkimg-d.gif
swedguy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-14-2005, 03:26 PM   #16
nico-t
emperor of my world
 
Join Date: Aug 2004
Location: nethalands
Posts: 29,903
holy shit i think its working now...
what i did:


I put this htaccess file in the root directory:
Code:
ErrorDocument 404 http://www.mydomain.com/404.html
ErrorDocument 403 http://www.mydomain.com/404.html

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^.*msn\. [NC]
RewriteCond %{HTTP_REFERER} !^.*yahoo\. [NC]
RewriteCond %{HTTP_REFERER} !^.*altavista\. [NC]
RewriteCond %{HTTP_REFERER} !^.*google\. [NC]
RewriteCond %{HTTP_REFERER} !^.*webcrawler\. [NC]
RewriteRule \.(jpe?g|gif|bmp|png)$ des/test/hotlinkimg-d.gif [L]
And i put this htaccess file in the folder where sites can hotlink from, except for 'fusker' etc:
Code:
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^.*fusker*.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^.*usefulidiot*.*$ [NC]
RewriteRule \.(jpe?g|gif|bmp|png)$ test/hotlinkimg-d.gif [L]
thanks swedguy for explaining
nico-t is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-14-2005, 03:29 PM   #17
swedguy
Confirmed User
 
Industry Role:
Join Date: Jan 2002
Posts: 7,981
np
swedguy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.