Re: [users@httpd] rewrite url to another url

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

 



On Tue, 8 Mar 2005 11:33:50 -0700, Kory Wheatley <wheakory@xxxxxxxxx> wrote:
> When someone types http://lx6.isu.edu  I would  like it to be
> redirected to http://www2d.isu.edu.  The ServerAlias directive will
> not work when your using dynamic virtual hosting, because I tried it
> out, and also read that it will not work if  virtual hosting is used.
> Right now to get this to work I have a symbolic link in /var/www
> called "lx6" and  it's directed to /var/www/www2d.
> Example   lx6 -> /var/www/www2d, but I would really like to remove
> this, because I don't think it's the best solution.

What's wrong with it?  Dynamic vhosting uses the filesystem as its
vhost database, so putting links in the filesystem seems like the
simplest and clearest way to link vhosts.

Yes, it can be done with mod_rewrite, but I don't see why you'd bother
with that extra complication.  Something like:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^lx6.isu.edu$ [NC]
RewriteRule (.*) /var/www/www2d$1

Joshua.

> 
> If it's a Rewrite rule I need, could someone send me an example of
> what I need to do here.  I've
> got the rewrite_module loaded on the server, but I've never done any
> rewrite conditions yet.  I have read the URL Rewriting Guide on the
> Apache home site, and I understand bits and pieces off it, but I don't
> want to turn the server on and off several times to get this to work.
> I need the server running as much as possible.
> 
> Thanks for your help in advance.
> 
> ---------------------------------------------------------------------
> 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
> 
>

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