Re: [Hampshire] aliasing domains in Debian Apache2

Top Page
Author: Andy Smith
Date:  
To: hampshire
Subject: Re: [Hampshire] aliasing domains in Debian Apache2

Reply to this message
gpg: failed to create temporary file '/var/lib/lurker/.#lk0x572db100.hantslug.org.uk.22199': Permission denied
gpg: keyblock resource '/var/lib/lurker/pubring.gpg': Permission denied
gpg: Signature made Fri Mar 11 20:58:37 2011 GMT
gpg: using DSA key 2099B64CBF15490B
gpg: Can't check signature: No public key
Hi John,

On Thu, Mar 10, 2011 at 10:14:31PM +0000, john lewis wrote:
> I have successfully set up 3 virtual sites on my server startx.co.uk
>
> one of these is http://startx.co.uk/KingsclereHistory
>
> the content of this website was originally hosted elsewhere with the URL
>
> http://kingsclere.org.uk/
>
> but the site owner wanted to give up hosting it. I have now acquired
> that domain name and the relevant files which I uploaded to my VPS and
> set up so it can be accessed as startx.co.uk/KingsclereHistory.
>
> I would like it to be possible for anyone using the original
> kingsclere.org.uk URL to be automatically routed to the new URL.


I would probably set up a new virtual host for kingsclere.org.uk and
then redirect all requests for anything under that to
http://startx.co.uk/KingsclereHistory as a permanent redirect. e.g.:

RedirectMatch permanent .* http://startx.co.uk/KingsclereHistory

Unless of course there is some URL structure that you wish to retain
in which case you might want to redirect
http://kingsclere.org.uk/foo to
http://startx.co.uk/KingsclereHistory/foo or whatever. e.g.

RedirectMatch permanent ^/(.*) http://startx.co.uk/KingsclereHistory/$1

http://httpd.apache.org/docs/2.0/mod/mod_alias.html#redirectmatch

Cheers,
Andy

--
http://bitfolk.com/ -- No-nonsense VPS hosting

<taras> i've had the same watch for 15 years now. MAN AND BOY
<taras> tbh Thomas the Tank Engine never dates