This is a discussion on rewrite rules (redirect all request to a single host) within the Apache Web Server forums, part of the Web Server and Related Forums category; sorry about this new message... i just noticed, that i messed up a running thread with the same subject. >&...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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. >> >> this is working only if they use 'simple' urls as www.google.com, >> www.cnn.com etc. >> >> it doesn't work for urls with subdirectories as www.google.com/news >> 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/ http://172.17.0.9/ ProxyPass /orange/traffic/ http://172.17.0.9/traffic/ 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: www.google.ch www.nzz.ch www.google.ch/news www.bild.t-online.de/BTO/index.html everything should be redirected to 172.17.0.9/index.php. 172.17.0.9 is the localhost. |