Use mod_rewrite and return a 301 HTTP status. See http://httpd.apache.org/docs/current/rewrite/remapping.html
Tony Cowderoy On 18/07/2014 09:41, Mark Rogers wrote: > I should really know the answer to this already but... > > Currently I have several sites configured in Apache along the lines of: > ServerName www.example.co.uk <http://www.example.co.uk> > ServerAlias example.co.uk <http://example.co.uk> *.example.co.uk > <http://example.co.uk> > ServerAlias example.com <http://example.com> *.example.com > <http://example.com> > > This is apparently causing Google penalties because something > somewhere is seeing otherwise perfectly legitimate links from one of > my sites to another as coming from abc.example.co.uk > <http://abc.example.co.uk> (where abc is any random set of characters). > > I need to change things so that all the ServerAlias'es perform a > permanent redirect to the ServerName (ie example.com/foo/bar > <http://example.com/foo/bar> will redirect to > www.example.co.uk/foo/bar <http://www.example.co.uk/foo/bar>) > > -- > Mark Rogers // More Solutions Ltd (Peterborough Office) // 0844 251 1450 > Registered in England (0456 0902) @ 13 Clarke Rd, Milton Keynes, MK1 1LG > > > _______________________________________________ > Peterboro mailing list > Peterboro@mailman.lug.org.uk > https://mailman.lug.org.uk/mailman/listinfo/peterboro
_______________________________________________ Peterboro mailing list Peterboro@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/peterboro