![]() |
![]() |
![]() |
||||
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. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
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. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: Jan 2002
Posts: 7,981
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 | |
emperor of my world
Join Date: Aug 2004
Location: nethalands
Posts: 29,903
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Too lazy to set a custom title
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 .... |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
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.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
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...
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Industry Role:
Join Date: Feb 2003
Posts: 7,340
|
Place a blank .htaccess file in the folder you want no restrictions on.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
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. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
emperor of my world
Join Date: Aug 2004
Location: nethalands
Posts: 29,903
|
Quote:
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? |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 | ||
Confirmed User
Industry Role:
Join Date: Jan 2002
Posts: 7,981
|
Quote:
Quote:
|
||
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
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 =)
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
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. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 | |
emperor of my world
Join Date: Aug 2004
Location: nethalands
Posts: 29,903
|
Quote:
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 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 |
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 |
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] 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] ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#17 |
Confirmed User
Industry Role:
Join Date: Jan 2002
Posts: 7,981
|
np
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |