| | | 
Progenic Family

Group: Forum Members Last Login: 2 days ago @ 7:35 PM Posts: 525, Visits: 1,361 |
| Anyone know something like this ?
ban redirect give of a certain message ? |
| | | | 
Regular Member

Group: Forum Members Last Login: Wednesday, September 03, 2008 5:34 AM Posts: 59, Visits: 233 |
| um, how do you want this to be done? via PHP or via Apache? just http ban or general server ban?
I usually ban IPs via iptables or hosts.deny, but of course this blocks any access and so there is just a "server not found" error for the "visitor". if you only want a http ban mod security is a good candidate...I don't know the exact filter rule at the moment, but should be no problem to find out by reading the docs or by sending a request to the mod security mailing list (which is a really good one).
but if you want to do it in PHP: sorry, I suck in PHP coding...^^ |
| | | | 
Progenic Family

Group: Forum Members Last Login: 2 days ago @ 7:35 PM Posts: 525, Visits: 1,361 |
| RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^/index.php/?(.*)$ [NC]RewriteCond %{HTTP_REFERER} !^http://www.allowedcom/(.*) [NC,OR] RewriteCond %{HTTP_REFERER} !^https://www.allowed.com/(.*) [NC]RewriteRule ^.*$ http://www.sendyouthere.com/ [R=301,L]
RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} http://www.mysite.net/ [NC]RewriteCond %{HTTP_REFERER} !^http://www.baned-site.com/ [NC]RewriteRule ^.*$ http://www.redirectsite.com/ [R=301,L]
I am trying something like this in .htaccess but seems not to work my goal is to redirect referrals from a certain website
The second one is what i want but it seems it just takes on the last command to rewrite and anywhere it comes from it redirects ...anyone know what's wrong with the syntax ?
FINALLY was just complicated the shit out of myself
SetEnvIfNoCase Referer evil-bad-site.com anything-here=yes
Order allow,deny allow from all deny from env=anything-here
|
| |
|
|