Welcome to MobyThreads.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

rewrite rules (redirect all request to a single host)

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Related Topics:
Rewrite rules - How do you rewrite links of the form: to make them google friendly ?

ReWrite Rules - Hi, Currently my homepage is However I would now want my homeapge to be: The dynamic page is different from the static one as the

rewrite rules - hi i redirect http traffic from blocked users to a internal to inform them, that they are blocked and to give some other 'useful' this is working only if they use 'simple' urls as etc. it doesn't work..

Rewrite rules & Subdomains - Hi, We are looking to use rewrites rules for Ex: -> We use this rule: on ^(.+) ..

Apache Rewrite Rules - Hello, I have compiled and mod_proxy into my apache 1.3.x server and are trying to rewrite any requests that come into the server for files in my cgi-bin/ directory to another apache server running on port 8080. I have tried these two rules..
Next:  Replicating IIS 5.0 configurations  
Author Message
moritz

External


Since: Dec 17, 2004
Posts: 2



(Msg. 1) Posted: Fri Dec 17, 2004 8:32 am
Post subject: rewrite rules (redirect all request to a single host)
Archived from groups: alt>apache>configuration (more info?)

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) 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]