On 2/13/06, Leandro Reis <lreis04@xxxxxxxxxxx> wrote: > Hi all, > > I currently host a web site that uses the URL (not real name) > http://machine1.mycorp.com. Also, I had the DNS updated so that the URL > http://anotheraddress.mycorp.com redirects to my site. > > What I would like to do is, for users who go to the > http://anotheraddress.mycorp.com ONLY, to redirect to a subpath of the main > URL, for example, http://machine1.mycorp.com/anotheraddress.html. > > In the Apache documentation, I have only been able to find redirection > instructions within the same URL. The version I'm running is 2.0.54. It's not clear what you want to happen if people go to a subpage under anotheraddress. I'll assume you want every request for that site to be redirected to anotheraddress.html on machine1. You can do this using mod_rewrite or name-based virtual hosts. I'll show the second technique: NameVirtualHost *:80 <VirtualHost *:80> ServerName machine1.mycorp.com DocumentRoot .... </VirtualHost> <VirtualHost *:80> ServerName anotheraddress.mycorp.com RedirectMatch / http://machine1.mycorp.com/anotheraddress.html </VirtualHost> Joshua. --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
![]() |