Pointing my old blog to the new one

Even though my old blog had literally 5 posts, because I am either:

  • A good internet citizen
  • A narcissist
  • Both

I have decided to do the good thing and do 302 redirects from the old posts to their new locations.

The first thing I needed to do was point my old blog (blog.abrahamheidebrecht.co) to the new location (gettinggui.com). This was easy to do with my domain registrar, hover.

Sidenote: hover is awesome. Definitely the best registrar I've used. If you haven't looked into them, go there now. Thank me later.

Because my old blog was using wordpress, the permalinks are slightly different from the ghost ones. Thankfully, I wasn't including the date, so it is literally off by one extra word in the path. My wordpress links were of the form /archives/post-slug and the ghost permalinks look are just /post-slug. Now, I am the furthest thing from an expert when it comes to configuring websites, but my spidey sense is telling me this should be easy. It is one word!

Because I am running the new blog on Azure, it is running under IIS (with nodeiis to host ghost). This means I can issue redirects through the web.config file. After a bit of googlefu, I altered my web.config to have two new rules (one is for the old rss feed, which is an even simpler redirect):

<rewrite>  
    <rules>
        <rule name="wp-redirect" stopProcessing="true">
            <match url="archives/(.+)$" />
            <action type="Redirect" url="/{R:1}" redirectType="Permanent" />
        </rule>
        <rule name="wp-rss" stopProcessing="true">
            <match url="feed" />
            <action type="Redirect" url="/rss" redirectType="Permanent" />
        </rule>
    </rules>
</rewrite>  

And bam, the old site's links point to my new blog!

-AH

Moving to ghost

As is obvious to the most casual of observers, I've never been the most prolific blogger. But, I have recently realized that I need to learn javascript (I can't stay a WPF developer my whole career if MS decides to stop updating it...). At least if I want to have... Read More