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-15-2002, 08:12 AM   #1
Naughty
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
Naughty is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-15-2002, 09:09 AM   #2
Mark the Pithy
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.

Last edited by Mark the Pithy; 02-15-2002 at 09:13 AM..
Mark the Pithy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-15-2002, 10:04 AM   #3
Naughty
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?
Naughty is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-15-2002, 10:40 AM   #4
Mark the Pithy
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 (damn pot addiction!) and all my bookmarks on the subject are on another machine.


Is it the script that sets the cookie that's not working or the .htaccess?


Stand back, my head is about to explode.
Mark the Pithy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-15-2002, 12:06 PM   #5
Naughty
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

Last edited by Naughty; 02-15-2002 at 12:08 PM..
Naughty is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-15-2002, 12:53 PM   #6
Mark the Pithy
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...
Mark the Pithy 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.