Re: [Hampshire] apropos PHP & web stuff

Top Page

Reply to this message
Author: john lewis
Date:  
To: hampshire
Subject: Re: [Hampshire] apropos PHP & web stuff
On Thu, 24 Apr 2008 11:19:05 +0100
Hugo Mills <hugo@???> wrote:

> > Having looked briefly at what PHP does in the 'PHP Manual' I
> > wondered if there is a simple bit of php I could use to do the
> > re-direction and to save me having to learn PHP just for this
> > 'one liner' am asking for an example.
>
>    Use the header() function[1] to force a redirect in the HTTP
> headers:

>
> header("Location: http://startx.co.uk/Kingsclere");
>
>    This needs to be done before any other output gets sent. However,
> if you control the server, use an Apache redirect, as below.

>
> > Alternatively a simple explanation of how to use apache2 to do it
> > would be gratefully accepted. I need to be told what files to
> > edit on a debian lenny setup and what lines of code to
> > remove/append.
>
>    I'd guess you're not using a virtual host configuration in
> Apache. If that's the case, simply add:


I did look at the virtual host configuration but decided that with
only one website it wasn't really necessary right now.

If I get a request to host another site, eg from a daughter if they
decide to put one of their houses on the market again and so wish to
resurrect the site I created for them, then I'll have to think again
about this.

> RedirectPermanent / http://startx.co.uk/Kingsclere
>
> to the end of your config file[2].
>
>    If you are using a virtual host, that line goes inside the VH
> definition instead.


Thanks Hugo.

--
John Lewis
Debian (Sid) & the GeneWeb genealogical data server