Page 1 of 1

multiple redirects with "Limit GET HEAD POST" ???

Posted: Sun Oct 25, 2009 8:33 pm
by marcr
Hello,

I want to know if I can send two different ip's to two different places, using the "order/deny" thing in htaccess.
I'm trying and reading now for a couple of hours and still no luck... :banghead:

This works, but the other one not

Code: Select all

ErrorDocument 403 http://www.altavista.com/
<Limit GET HEAD POST>
order allow,deny
deny from 11.111.111.111
allow from all
</LIMIT>

Code: Select all

ErrorDocument 403 http://www.altavista.com/
<Limit GET HEAD POST>
order allow,deny
deny from 11.111.111.111
allow from all
</LIMIT>
ErrorDocument 403 http://www.yahoo.com/
<Limit GET HEAD POST>
order allow,deny
deny from 22.222.222.222
allow from all
</LIMIT>

Re: multiple redirects with "Limit GET HEAD POST" ???

Posted: Sun Oct 25, 2009 8:44 pm
by requinix
mod_rewrite would be a better solution - one that works, even. Using an ErrorDocument to redirect users is practically abusive.

Code: Select all

RewriteEngine On
 
RewriteCond %{REMOTE_ADDR} ^11.111.111.111$
RewriteRule ^ http://www.altavista.com
 
RewriteCond %{REMOTE_ADDR} ^22.222.222.222$
RewriteRule ^ http://www.yahoo.com
An even better solution would be to build this redirection thing into the authentication code for your site.

Re: multiple redirects with "Limit GET HEAD POST" ???

Posted: Sun Oct 25, 2009 9:27 pm
by marcr
Thank you! :P