sorry about this new message... i just noticed, that i messed up a
running thread with the same subject.
>> hi
>>
>> i redirect http traffic from blocked users to a internal webserver,
to
>> inform them, that they are blocked and to give some other 'useful'
>> information.
>>
<font color=green> >> this is working only if they use 'simple' urls as <a style='text-decoration: underline;' href="http://www.google.com,</font" target="_blank">www.google.com,</font</a>>
>> <a style='text-decoration: underline;' href="http://www.cnn.com" target="_blank">www.cnn.com</a> etc.
>>
<font color=green> >> it doesn't work for urls with subdirectories as <a style='text-decoration: underline;' href="http://www.google.com/news</font" target="_blank">www.google.com/news</font</a>>
>> and so on.
>>
>> i tried a little bit with the rewriting rules, but honestly it does
>> not work at all.
>>
>> has someone a solution for it or some good links?
>
>Can you give us some more info on your current configuration? Do
>you have Apache configured as a forward proxy server?
>
apache is running on the gateway, where the users get blocked. this
are the iptables rules for redirecting:
$IPTABLES -t nat -A PREROUTING -p tcp --dport 80 -m mac --mac-source
$i -j REDIRECT --to-port 80 || error=1
$IPTABLES -t nat -A PREROUTING -m mac --mac-source $i -j DROP ||
error=1
apache server has nothing special. no virtual host, no proxy. but one
tricky thing, our official webserver uses some pages via proxy pass:
ProxyPass /orange/ <a style='text-decoration: underline;' href="http://172.17.0.9/" target="_blank">http://172.17.0.9/</a>
ProxyPass /orange/traffic/ <a style='text-decoration: underline;' href="http://172.17.0.9/traffic/" target="_blank">http://172.17.0.9/traffic/</a>
in future it is planned to use ssl proxypass... if this is possible.
all i want now is, that every http-request done by a blocked user will
go to 172.17.0.9/index.php.
if a user tries to connect to:
<a style='text-decoration: underline;' href="http://www.google.ch" target="_blank">www.google.ch</a>
<a style='text-decoration: underline;' href="http://www.nzz.ch" target="_blank">www.nzz.ch</a>
<a style='text-decoration: underline;' href="http://www.google.ch/news" target="_blank">www.google.ch/news</a>
<a style='text-decoration: underline;' href="http://www.bild.t-online.de/BTO/index.html" target="_blank">www.bild.t-online.de/BTO/index.html</a>
everything should be redirected to 172.17.0.9/index.php.
172.17.0.9 is the localhost.<!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: rewrite rules (redirect all request to a single host)