[Gllug] apache/php/htaccess type question

Vincent AE Scott gllug at codex.net
Thu May 23 18:18:16 UTC 2002


Daniel Andersson(daniel at septum.org)@Thu, May 23, 2002 at 05:32:12PM +0100:
> 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;
> }
> ?>

Thanks for that, it kind of worked.  Well, it worked up to the point of
adding an elseif() for a seperate domain.  grr, bizzare.

 
> one possibility
> but there must be a way with apache, one would think..

Looks like the VirtualHost directive offered by others will only work in
the global config file, which i dont have access to.

cheers for the php example, will try and work out why its not quite
working correctly in my particular instance.

-v

-- 
keys:  http://codex.net/pgp/gpg.asc http://codex.net/pgp/pgp.asc

 C:\DOS C:\DOS\RUN RUN\DOS\RUN 



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




More information about the GLLUG mailing list