![]() |
![]() |
![]() |
||||
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: Mar 2002
Location: c9media.com
Posts: 3,240
|
![]() 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> |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
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
__________________
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
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] |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 | |
Confirmed User
Join Date: May 2002
Location: Doesn't matter, I'm not buying you another pint!
Posts: 1,511
|
Quote:
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? |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
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!!! ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
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).
|
![]() |
![]() ![]() ![]() ![]() ![]() |