Dec 05 2009

Want Virtual Snow on your site?

Category: .miscAmit Bahree @ 1:15 pm

If you want virtual snow (probably nicer than the real stuff as there is no slush left to clean up) then check out Snowstorm: JavaScript snow effect for HTML. Be warned though – this uses a lot of CPU on the computer redendering the page and it will slow things down. Quite cool though.

Share

Tags:


Dec 02 2009

Redirects setup

Category: .misc,.opensourceAmit Bahree @ 11:59 pm

After moving the blog to  WordPress, almost all my redirects should work now from the old blog posts to the new one. For example if you click on this old url http://desigeek.com/weblog/amit/archive/2009/10/25/installing-openscenegraph-on-ubuntu.aspx it should redirect you and you see the new and correct url.

Overall it was simple to setup via the .htaccess file and some simple regex. The only thing I found the hard way was that I should be using “RedirectMatch” when setting up the regex rule rather than the “Redirect” which is what I was using. You would use Redirect when trying to redirect without any variables.

So, as in my case I wanted to redirect from the old url (of community server) to the new one (of wordpress)

  • Old: http://desigeek.com/weblog/amit/archive/2009/10/25/installing-openscenegraph-on-ubuntu.aspx
  • New: http://desigeek.com/blog/amit/2009/10/25/installing-openscenegraph-on-ubuntu/

So I need to make the following changes:

  • Change the “/weblog” to “/blog”
  • Get rid of “/archive”
  • Get red of the “.aspx” extension

The following rule helped me achieve this:

RedirectMatch 301 /weblog/amit/archive/([0-9][0-9][0-9][0-9])/([0-9][0-9])/([0-9][0-9])/(.*)\.aspx$ http://desigeek.com/blog/amit/$1/$2/$3/$4

Of course there are a few more rules I have which I cannot go into details.

Along the way i also discovered a few interesting tools which can help you view the results – one is LiveHTTPHeaders; another good one is http://web-sniffer.net/.

If you are new to this, then a few very good tools online. I would suggest start with this post from Zo and this tutorial on regex.

i still have one outstanding issue where if I want to redirect part of the URL and not the complete thing, I am not sure how to do it. For example if I want to redirect the old url above to just the year/month of the post instead if the actual post, not sure how to go about doing it. So I want the url below to map to the the one below that.

  • URL to Map: http://desigeek.com/weblog/amit/archive/2009/10/25/installing-openscenegraph-on-ubuntu.aspx
  • Should map to: http://desigeek.com/weblog/amit/archive/2009/10/
Share

Tags: ,


Dec 01 2009

Thought of the day

Category: .lolAmit Bahree @ 11:38 pm

Save the whales. Feed the hungry. Free the mallocs.
- Anonymous

Share

Tags:


« Previous Page
Get Adobe Flash playerPlugin by wpburn.com wordpress themes