Domain Changing Woes

First of all, my apologies for the long absence. I’ve been all tied up with assignements and such. I just applied for the domain “jnls.net” from my host at RM 35 for a year. Being excited and all, I started out the “domain shifting procedures”. However, things didn’t really go as planned.

Well, the existing blog is located at beyondsimplicity.net/jnls, and I want to move it to jnls.net/. Sounds easy enough, but I can’t seem to figure out how the .htaccess redirection should be written. It’s probably a mod_rewrite or something, but I’ll have to figure some regular expression out. Anyway, if you happen to move your (wordpress) blog, take note of these:

1) Before moving the files/directories, make sure you change your “blog location”. You’d want to be able to access your admin panel after your “shift”.

2) Now move the files.

3) Finally, set up redirections. This is the step which I was stuck at. Sigh…

Anyway, please note that if you can no longer access the site, check out http://jnls.net. You’d also want to update your bookmarks and rss readers. The existing domain expires on Dec 1, and I hope to figure out the redirects by then.

Tags: ,

2 Responses to “Domain Changing Woes”

  1. David Says:
    November 22nd, 2005 at 3:08 pm

    Hi, try this:

    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^(www\.)?beyondsimplicity\.net/jnls/ [NC]
    RewriteRule ^(.*)$ http://jlns.net/$1 [R=301,L] 

    make sure you have the trailing slash behind beyondsimplicity.net/jnls/

    if your paths are the same the above code should work. i think. I’m not an expert, I found the code here http://www.sitepoint.com/forums/showthread.php?t=152231

  2. Jonathan Ng Says:
    November 23rd, 2005 at 1:47 am

    David, adding the folder path at RewriteCond won’t work because HTTP_HOST is just the domain, not the entire URL. I’ve posted my final solution here.

Leave a Reply