NameCheap 301 Url Redirect Doesn’t Support Url to Url Mapping

As I have told you I just sifted my blog to the new domain waveofweb.com. So I was looking for a way to map each url of my old domain to the new one. Obviously there is a way to do it in .htaccess file. And like most of the hosting companies my host DreamHost does support Apache mod-rewrite to use .htaccess. But I heard that Namecheap provides 301 redirect if you transfer DNS to them. And you can do it in UI with just a few clicks and without modifying any code by hand. So I used to it. But that 301 redirect will only redirect any url of the old domain to the new domain’s home page. So all my blog post urls or About page or any any other url of the old domain were getting redirected to the blog home page. I contacted their support in live chat. But they were unable to provide any solution.

So I transferred back my old domain to my hosting company NameServer. I modified the code in .htaccess file. And url to url mapping from old domain to the new one started working perfectly :)

Related posts:

  1. .YU Domain on Temporary Life Support for Another 6 Months
  2. WhoisGuard Renewal Or New Subscription Just For 99 Cent At NameCheap
  3. It Will Cost You A Bit More To Use NameCheap’s Free SSL Certificate
Categories: Domains Tags:
  1. July 22nd, 2010 at 02:51 | #1

    It’d be helpful if you included the .htaccess code you used.

  2. admin
    July 22nd, 2010 at 16:07 | #2

    @Hans Mast
    Yeah, I should have added that code :)
    So if you find .htaccess file in your old domain empty, just add the below code

    
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
    

    But in case of your WordPress blog, you will most probably find the below two lines in your .htaccess file

    
    Options +FollowSymLinks
    RewriteEngine on
    

    In that case just add the following line right after the above two lines and before any other rewrite rules

    
    RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
    

    Remember to change “newdomain.com” with your new domain name. And whether you want to use “www” or not, that’s your choice. This is enough for url to url mapping using 301 redirect.

  1. No trackbacks yet.