httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John.C.Kenn...@LDHEnergy.com
Subject Re: [users@httpd] Redirect question
Date Fri, 07 May 2010 16:16:02 GMT
Igor Cicimov <icicimov@gmail.com> wrote on 05/07/2010 01:39:59 AM:

> Igor Cicimov <icicimov@gmail.com> 
> 05/07/2010 01:39 AM
> 
> Please respond to
> users@httpd.apache.org
> 
> To
> 
> users@httpd.apache.org
> 
> cc
> 
> Subject
> 
> Re: [users@httpd] Redirect question
> 
> Another possible solution I can think of:
> 
> NameVirtualHost 1.2.3.4:80
> <VirtualHost _default_:80>
> # Virtual host that will collect all the request not hitting
> # the main virtual host (including application.example.com one)
> # and redirect them to server.example.com/application
> DocumentRoot /usr/local/apache2/htdocs
> Redirect permanent / http://server.example.com/application
> </VirtualHost>
> <VirtualHost 1.2.3.4:80>
> # Your man virtual host
> DocumentRoot /usr/local/apache2/htdocs
> ServerName server.example.com
> .
> .
> .
> </VirtualHost>
> 
> Igor

What ended up working for us was RedirectMatch. I had tried this at one 
time but messed up the regular expression.
The syntax I needed was:

RedirectMatch ^/$ http://application/application

Since "application" is in DNS pointing to "server" this works.

Thanks to EVERYONE who gave suggestions...
John
Mime
View raw message