[Gllug] apache/php/htaccess type question

Stephen Harker steve at pauken.co.uk
Thu May 23 16:51:17 UTC 2002


On Thu, 2002-05-23 at 17:32, Daniel Andersson wrote:
> you can do it with php (with register_globals = on)
> 
> <?
> if ($HTTP_HOST == "my.subdomain.domain.com")
> {
>     header("Location: http://domain.com/my.subdomain/");
>     exit;
> }
> ?>
> 
> one possibility
> but there must be a way with apache, one would think..
You need to set up a <VirtualHost> directive thingy in the apache
httpd.conf file. It listens for http requests to a particular hostname
and uses a different document root accordingly.
Steve
 




-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list