Discussion Locked

Website Redirection Setting?

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Dear friends,
Could you help me out? Do you know how to config your Apache web server so that whenever you type an URL address, it will automatically redirects it to another website, while the typed address in still retained in the URL address location? Thanks.

7 replies

by riky

Hi, I've tried your solution. I've add ProxyRemote and deleted Redirect command. But it is not working. Does it means that the Apache Webserver need to be configured as a proxy? My server wasn't configured to do this in the first place. Does it all I need to do is to remove the '#' character on the Proxy segment on the httpd.conf file? What I want to do is just like website forwarding functionality. Thanks again for your help.

by insatiable

If you haven't had the time to check information at www.apache.org. I use it all the time and I run Netscape webservers! :-)

Anyway, at this url, there's a section for the apache module called mod alias and it uses the redirect:
http://www.apache.org/docs/mod/mod_alias.html

The example code they give is:
Redirect /service http://foo2.bar.com/service

What this means is that when the client requests http://myserver/service/foo.txt, it will be told to access http://foo2.bar.com/service/foo.txt

Hopefully this will help you. If you need more information on how to use the apache modules, check out the user guide at http://www.apache.org/docs

GOOD LUCK!
Melissa

by riky

Thanks for your comment. I've tried all your suggestions long before I've post this question in here. What I want is not only website redirection, but also the URL address is the same of what you've typed in the address location of your browser after the redirection. For example, a user type 'www.abc.com' at the URL address location, I want to redirect it to 'www.xyz.net/dir1/info2/example/'. After it is redirected to 'www.xyz.net/dir1/info2/example/', but the user will still see 'www.abc.com' in his browser's address location. If we use 'redirect', the browser address location will shows 'www.xyz.net/dir1/info2/example/' immediately after a user type 'www.abc.com'.

by grumbler

Like someone said before the solution would
be to use a proxy, but it will be a reverse proxy, . Squid is a good option, since it supports web server acceleration and redirection. Just point the IP address of your web site to the squid server and configure the squid to access the real server. Check the squid documentation at
www.squid-cache.org

This discussion is closed to new replies.