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 Wed, 05 May 2010 21:52:39 GMT
----- Original Message -----
> From: John.C.Kennedy@LDHEnergy.com
> Date: Wed, 5 May 2010 16:46:34 -0400
> Subject: [users@httpd] Redirect question
> To: users@httpd.apache.org
> 
>
> My user wants me to set up so that
> http://application <http://application/>
> will redirect to:
> http://server/application

How are your VirtualHost containers setup (assuming you are using them)? 
A simple rewrite rule with the domain check should work (assuming that 
"application" and "server" are domain names).

<VirtualHost 1.2.3.4:80>
    ServerName  server
    ServerAlias application

    RewriteEngine   On
    RewriteCond %{HTTP_HOST} ^application$ [NC]
    RewriteRule . http://server/application [R=permanent]
    .... 
</VirtualHost>


-- 
Justin Pasher


I get the same looping result. (I shortened application to app because I 
am too lazy to type all that!):
The requested URL 
/appappappappappappappappappappappappappappappappappappappappapp was not 
found on this server. 

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



Mime
View raw message