![]() |
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. |
|
Quote:
|
Aren't all subfolders subject to the " top " htaccess file ???
So you couldn;t be LESS restrictive, but MORE restrictive in subfolders.... ???? |
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 |
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.
|
fuck this is a lil more complicated then i thought... i have to think backwards and shit.. damn... testing some shit out now tho...
|
Place a blank .htaccess file in the folder you want no restrictions on.
|
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. |
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? |
Quote:
Quote:
|
I just use proxypass... they take care of everything and you don't have to do anything at all for $50 =)
|
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 http://nuvisiongroup.com/hotlink/boobies.gif If you look at the same thread from gfy.com, you should see a pink Elephant fucking-around-and-business-discussion/431645-htaccess-folder.html EDIT: Remember to clear your cache, otherwise you will still see the boobs. |
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 |
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 |
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 Code:
RewriteEngine On |
np :thumbsup
|
All times are GMT -7. The time now is 07:00 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123