Forum Moderators: phranque
I have used a 301 redirect in my httpd.conf file to forward all my clients domains to their main domain as the general concensus is that thsi is the best way to approach multiple domains situation without making search engines think I am duplicating content.
My problem being that one of my domains the .co.uk version of the sites main .com domain most likely has links to pages on it as this was the first domain to be used and was swapped over later to the .com.
if i type the .co.uk domain into my browsers address bar, it successfully redirects to my main .com address BUT if I type in a page that once existed such as www.domain.co.uk/home.php it just comes up with the page cannot be displaid error.
my redirect looks like
<virtualhost 192.#*$!.xxx.xxx>
servername www.domain.co.uk
redirect 301 / [domain.com...]
</virtualhost>
I was expecting this to redirect anything through to the new .com domain but currently it doesn't seem to be working like that.
any advice to what is going wrong here would be much appreciated.
J
Redirect 301 / [domain.com...]
allow, lets say the url [domain.co.uk...] to be redirected to [domain.com...] or do I have to put some sort of wildcard in to tell it to forward all files not just the domain
thanks for the speedy reply
J
No, http://www.example.co.uk/home.php would be redirected to http://www.example.com/home.php, and http://www.example.co.uk/<anything> would be redirected to http://www.example.com/<anything>.
Redirect uses prefix-matching. See Apache mod_alias [httpd.apache.org] for more info.
Jim