Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I wanted to switch my site from www.mutantspace.ie to www.mutantspace.com. Up until now the .com was my parked domain. I looked into it and was told that using this code in my .htaccess file in www.mutantspace.ie would work:

RewriteEngine on
RewriteCond %{http_host} !^www.mutantspace.ie$ [nc]
RewriteRule ^(.*)$ http://www.mutantspace.com/$1 [r=301,nc,L] 

I then asked my provider and he said 'Where are you moving too though?' Then he told me best way was for them to repoint site to www.mutantspace.com. I said fine (in my ignorance) and that is whats happened.

However even though new URLs are being indexed I have 100s of old URLs out there returning 404s. Now I can't access my old .htaccess file to put in permanent redirects because its now .com. Is there any code that I can use anywhere in my root directory that will redirect old www.mutantspace.ie pages to their corresponding www.mutantspace.com/ pages?

share|improve this question

migrated from stackoverflow.com Jul 26 '11 at 11:13

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer

If you had one hosting account for the .ie domain, then simply pointing the .com to the same hosting would be the simplest, to avoid having to move/upload files. Then set the .ie domain to redirect to the .com.

It sounds like your host did the first part, but have ignored the .ie domain. Depending on where the domain is held, you should be able to set up a redirect to the .com. Some domain providers do this well, redirecting the domain and all sub pages with a 301 redirect. Other providers only redirect the root domain, or redirect all requests from one domain to a single domain (i.e. a URL like example.ie/page goes to example.com - this is not what you want).

Alternatively, point both domains to the same hosting and use the .htaccess as above to do the redirecting.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.