I have a subnet of computers connected to Internet through a router (which could be a HTTP proxy as well).
My goal is to change URL parameter for a one single URL.
If users go to http://www.google.com/ or to http://www.google.com/?hl=en, in both cases they should see content from http://www.google.com/?hl=fr
Is it possible to do this using url rewriting in apache config? What other approaches could become the easiest way to achieve the goal?
Update: google.com is used just an example, that's not the case.
You can use SQUID, which is a more commonly used as a proxy, to accomplish what you are attempting. The
url_rewrite_program
option allows for requests to be sent to a script for rewriting.The following script would substitute the url in the manor you describe:
If you prefer to use apache, it sounds like it can be done with a combination of
mod_proxy
andmod_rewrite
. See this page on apache.org for a tutorial.