Sign up ×
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 to 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 would work:

RewriteEngine on
RewriteCond %{http_host} !^$ [nc]
RewriteRule ^(.*)$$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 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 pages to their corresponding pages?

share|improve this question

migrated from Jul 26 '11 at 11:13

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

1 Answer 1

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 goes to - 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

Your Answer


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