![]() |
.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> |
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 |
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] |
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? |
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!!! :thumbsup :thumbsup |
Keep in mind that anyone using Norton (and the likes) have their HTTP_REFERERs blocked (they are deleted and do not exist).
|
All times are GMT -7. The time now is 04:41 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123