Archive for April, 2008

Please tell me this is a spoof, Microsoft.

// April 17th, 2008 // 1 Comment » // LOL, WOW

Ok…so let’s face it. Windows Vista has had it’s own problems just like with any other Microsoft OS. And we also know that this one stings much more than others because of all the hype around it. (6 years in the making? All for this?)

My notebook runs Vista Ulitmate Edition and it’s only a year old. But it has already BSOD’ed on me. Thrice (at least).

In any case, check this video out. I can only hope it’s a joke. It may not be. Either way, it made me LOL.

How to set up clean URLs for a WordPress site in IIS

// April 10th, 2008 // 2 Comments » // IIS, PHP, Windows 2003, Wordpress

As promised in the previous post, here’s what you need to do to get clean URLs for WP in IIS.

  1. Create a new PHP file wp-404-handler.php in the root folder (in case you are not sure, this is the folder that has “wp-admin”, “wp-content”, “wp-includes” sub folders and bunch of other php files ) and copy paste the following code in it.<?php
    $qs = $_SERVER['QUERY_STRING'];
    $pos = strrpos($qs, ‘://’);
    $pos = strpos($qs, ‘/’, $pos + 4);
    $_SERVER['REQUEST_URI'] = substr($qs, $pos);
    $_SERVER['PATH_INFO'] = $_SERVER['REQUEST_URI'];
    include(‘index.php’);
    ?>
  2. Open IIS manager – Expand local computer – Expand Web Sites – Right click on your site – Click Properties – Click Custom Errors tab – Select 404. (See image below)IIS Website Custom errors tab
  3. Click Edit – Set Message Type to “URL” and URL to “/” (See image below)404 edit properties
  4. Click OK.
  5. Now login to your WordPress admin control panel. Click Settings and click Permalink (wp-admin/options-permalink.php)
  6. Select “Custom structure” and set the text to “/%year%/%monthnum%/%day%/%postname%/”
  7. And you are done! Your site should now have clean URLs like this site does.

New domain. New site.

// April 1st, 2008 // 5 Comments » // Fun, Miscellaneous, Pet projects, Wordpress

A few days back i bought a new domain name (see URL) inspired by Matthew Mullenweg‘s domain, founding developer of WordPress.

I know. i know. Vanity is not really my thing. But hey… sometimes you just gotta give in. :) (Did that rhyme, btw?)

So anyways, a new (and really cool) domain name deserved a new site i thought. And i started hunting for some cool WordPress template and after a lot of reviewing, decided to use PortraitPress theme by Magnus Jepson.

I wish i was as creative as the Visual Designers i work with, that design and build their site’s theme (mostly on blog engines like WordPress or textpattern or Expression Engine) from scratch.

But i’m not (i’m “just” a programmer) and as long as there are kind souls like Magnus, that don’t mind sharing their beautiful work for free, i don’t mind using it either.

Take a look around and let me know what you think.

And Oh..oh… before i forget, note the clean URLs. Getting WordPress to strip off the “index.php” was a big pain in the butt in the previous versions. For example, “http://example.com/index.php/2008/04/01/sample-post/“. And since almost all of the fixes they recommended, involved editing the .htaccess file which doesn’t apply to IIS, i never got it to work.

But this time, the site has clean URLs, for eg: http://giri.sh/contact and http://giri.sh/about, even though it is hosted on the same environment – IIS on Windows 2003 server. I’ll post a tutorial with screenshots on how to do it.

By the way, if you are reading this from your RSS reader, don’t bother updating your feed URL. I’ve been using feedburner to publish my feeds and i have updated it already. But please visit the site and lemme know what you think.