Re: Redirect question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----- Original Message -----
From: John.C.Kennedy@xxxxxxxxxxxxx
Date: Wed, 5 May 2010 16:46:34 -0400
Subject:  Redirect question
To: users@xxxxxxxxxxxxxxxx


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

---------------------------------------------------------------------
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


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux