skip to main | skip to sidebar

16 February 2010

BlogEngine.NET – HOWTO - Redirect Blogger Post Entry to BE.NET Post Entry

Earlier from my post about redirecting my visitors to BE.NET Search here; because I haven’t found a way to redirect to the BE.NET blog entry it self.

Now I think I did it! A new method to redirect your visitors to BE.NET blog entry!

 

The Story

Migrating from Blogger to BlogEngine.NET is quite fun and a little bit problematic. But of course, that’s the beauty of learning.

If you want to migrate from Blogger to BlogEngine.NET. You have to use BloggerToBlogML from Aaron Lerch. He already provided steps there so I think you have to read those in his blog.

If you have multiple blogs on account. I suggest hiding the others first on your profile.

BloggerToBlogML. Is a PowerShell script that converts Blogger posts to XML (Please correct me if I’m wrong)

Importing BlogML XML to BlogEngine.NET – You have to use, Blog Importer

So, Good luck!

 

Now you’re all set. (Hopefully)

So how will you let your visitors redirect to your new BlogEngine.NET site and specifically on the BE.NET blog entry?

 

Here are the steps.

Extract and Upload this files in your BE.NET website.

In your Blogger Dashboard

1. Click Layout on one of your blogs.

2. Click Edit HTML

3. Check Expand Widget Templates

4. Copy the entire html code and paste it on your favorite html editor. Notepad++ for example. I like N++ so much

5. Search for this part “<b:includable id='post' var='post'>” (without double quote)

6. Paste this code below that element “<b:includable …….”

<b:if cond='data:blog.url != data:blog.homepageUrl'>
<script src='http://www.jaysonragasa.net/scripts/Encoder.js' type='text/javascript'/>
<script type='text/javascript'>
var title = &quot;<data:post.title/>&quot;;

title = Encoder.htmlDecode(title);

window.location = &quot;http://www.jaysonragasa.net/bepostredirect.aspx?q=blogger|&quot; + title;
</script>
<b:else/>
<script type='text/javascript'>
alert("I have moved my blogs to my new website. After clicking the OK button. You will be redirected");
window.location = &quot;http://www.jaysonragasa.net&quot;
</script>
</b:if>


NOTE!!! Please change the domain name which was mine .. to your domain



7. Select all those html code again from your HTML editor



8. Replace the current HTML code in your blog layout (Edit HTML Page) and click “SAVE TEMPLATE”



9. and test it out!



 



The Idea



The idea was simple. Since we have an identical blog entries from Blogger to BE.NET. We take the Title from blogger entry and do a Lookup on BE.NET search result then redirect. That’s it!

0 comments: