Redirecting (in Apache) all domains to one domain.

I've been playing with Apache's redirection directives for a while, trying to have all my domains redirected to bar.net when someone tries e.g. www.bar.net, foobar.net and so on, showing http://bar.net/ in the address line of the browser.

This regardless of the URL someone tries to access; if someone tries http://www.foo.net/ cake/monster.html, I want them redirected to http://bar.net/cake/monster.html.

I haven't figured out how yet, but I assume someone here knows how.

Thanks a lot!!

 

 

 

 

Top