|
|
|
||||
|
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 |
|
Confirmed User
Industry Role:
Join Date: Jul 2001
Location: Utopia
Posts: 6,483
|
Cookies and Protect directory
I'm trying to protect a directory for everybody that visits through the backdoor (SE's, Bookmarks), they have to visit a warning page first. I have been trying some stuff with cookies and htaccess, but cannot get it to work properly.
Anybody know a good site where that info is explained? It must not be password protected, I see plenty of info on that subject, it is just a page where the cookie is set before entering the site, no cookie --> no site.
__________________
seks.ai for sale - ping me |
|
|
|
|
|
#2 |
|
Confirmed User
Join Date: Oct 2001
Location: Upstate New Yawk
Posts: 276
|
Naughty, this problem is currently being discussed here along with an example script: http://www.tgswupdates.com/cgi-bin/i...rum=3&topic=75
Btw, you could probably just have .htaccess look for the accept-cookie header without bothering with an actual cookie being set at first. D'oh. Different issue. Nevermind that second part. The auto-set username/password cookie scripts will work though. |
|
|
|
|
|
#3 |
|
Confirmed User
Industry Role:
Join Date: Jul 2001
Location: Utopia
Posts: 6,483
|
Mark, that is how I got the idea. That script up there doesn't work for me, so I thought I'd look for more info to try to solve it.
Did it work for you? |
|
|
|
|
|
#4 |
|
Confirmed User
Join Date: Oct 2001
Location: Upstate New Yawk
Posts: 276
|
I haven't tried fooling around with that script as I just found out about the discussion after Vince posted on CC's board. .htaccess and cookies is basic stuff but I can't seem to remember that shit
Is it the script that sets the cookie that's not working or the .htaccess? Stand back, my head is about to explode. ![]() |
|
|
|
|
|
#5 |
|
Confirmed User
Industry Role:
Join Date: Jul 2001
Location: Utopia
Posts: 6,483
|
Actually, this works:
RewriteEngine On RewriteCond %{HTTP_COOKIE} !^.*login=pass.*$ RewriteCond %{HTTP_REFERER} !^http://([a-z0-9-]+\.)*naughtysecrets.co.uk/ [NC] RewriteRule .* http://www.naughtycelebs.co.uk/gallery/ [R,L] BUT, as soon as I change it to this, it stops working: RewriteEngine On RewriteCond %{HTTP_COOKIE} !^.*login=pass.*$ RewriteCond %{HTTP_USER_AGENT} ^.*Buddy.*$ [OR] RewriteCond %{HTTP_USER_AGENT} ^.*Whacker.*$ [OR] RewriteCond %{HTTP_USER_AGENT} ^.*FileHound.*$ RewriteCond %{HTTP_REFERER} !^http://([a-z0-9-]+\.)*naughtysecrets.co.uk/ [NC] RewriteRule .* http://www.naughtycelebs.co.uk/gallery/ [R,L] I'm puzzled |
|
|
|
|
|
#6 |
|
Confirmed User
Join Date: Oct 2001
Location: Upstate New Yawk
Posts: 276
|
Weird. Just the sitesnagger user agent entries breaks it?
Bowing out to the .htaccess gurus... |
|
|
|