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 09-16-2002, 04:18 PM   #1
sexyclicks
Confirmed User
 
sexyclicks's Avatar
 
Industry Role:
Join Date: Mar 2002
Location: c9media.com
Posts: 3,240
.htaccess HELP

I want to allow certain referers using .htaccess (or anything similar)

For example when the user is coming from mydomain1.com is allowed to enter but if coming from mydomain2.com is not....

Example:
Code:
<Limit GET>                                                                
order deny,allow
deny from all
referer allow from http://yourdomain.com/*
</Limit>
Am I crazy?
sexyclicks is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-16-2002, 04:24 PM   #2
salsbury
Confirmed User
 
Join Date: Feb 2002
Location: Seattle
Posts: 1,070
you're not crazy, it'd be nice if it worked that way, but it's a bit more complex.

just a warning though: this isn't perfect. referrers are frequently broken or just plain missing. it's not really wise to only allow certain referers in unless you also allow null referers and some of those all x referers some software generates.

ok, with that said, here goes.

let's assume you just want to allow all referers in except one:

RewriteEngine on
RewriteCond %{HTTP_REFERER} http://www.baddomain.com/ [NC]
RewriteRule /* http://www.yahoo.com/ [R,L]

you can use ! in front of the http:// on the RewriteCond line to negate the conditional. check hotlink protection .htaccess rules for more details, or Apache's excellent guide http://httpd.apache.org/docs/misc/rewriteguide.html
__________________

Last edited by salsbury; 09-16-2002 at 04:36 PM..
salsbury is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-16-2002, 04:26 PM   #3
Buck
Registered User
 
Join Date: Sep 2002
Posts: 27
AuthUserFile /dev/null
AuthGroupFile /dev/null

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://YOURDOMAIN.com/ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.YOURDOMAIN.com/ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.YOURIP/ [NC]
RewriteRule /* http://www.YOUR_DOMAIN.com/ [R,L]
Buck is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-16-2002, 04:28 PM   #4
some_idiot
Confirmed User
 
Join Date: May 2002
Location: Doesn't matter, I'm not buying you another pint!
Posts: 1,511
Quote:
Originally posted by sexyclicks
I want to allow certain referers using .htaccess (or anything similar)

For example when the user is coming from mydomain1.com is allowed to enter but if coming from mydomain2.com is not....

Example:
Code:
Limit GET                                                               
order deny,allow
deny from all
referer allow from http://yourdomain.com/*
/Limit
Am I crazy?
You seem to have httpd.conf commands here not
htaccess.

If you want htaccess from a referrer, use the rewrite
conditional.

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://*yourdomain.com/ [NC]
RewriteRule /* http://send.badguys.here.com/ [R,L]

... do you want the httpd.conf for doing similar?
some_idiot is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-16-2002, 04:34 PM   #5
sexyclicks
Confirmed User
 
sexyclicks's Avatar
 
Industry Role:
Join Date: Mar 2002
Location: c9media.com
Posts: 3,240
YOU GUYS ROCK!!!!

I am trying 1 hour reading shit like this one here http://accessreferer.sourceforge.net...#allow_referer and in less than 3 min my problem is solved from GFY crew!!!

sexyclicks is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-16-2002, 06:21 PM   #6
HQ
Confirmed User
 
Join Date: Jan 2001
Posts: 3,539
Keep in mind that anyone using Norton (and the likes) have their HTTP_REFERERs blocked (they are deleted and do not exist).
HQ 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.