Matt's Blog

Archive for the ‘Miscellaneous’ Category

Do the Right Thing, Post a Comment and Donate $3 to the BC Children’s Hospital

Friday, July 6th, 2007

Stephen Fung had decided to give 3 games to the BC Children’s Hospital; so that the kids staying there have something fun to do. He’s giving them Fifa 07, Tiger Woods PGA Tour 07 and NBA Live 07 (non-violent games 😛 ).

But, wait, there’s more! He has decided to also give away a copy of NBA Live 07 to a random person who comments. You get 1 entry for a comment on the post, and you can get an extra entry for Blogging about the post. Also, for every unique comment, he is going to donate 1 dollar (Canadian, obviously 😛 ) to a charity of a random commenter’s choice, up to $100. But, wait, it gets even better. BlueFur and Newport Business Media are going to match that donation, dollar for dollar! That’s a possible donation of $300!

So, for simply taking 30 seconds (or less) of your time to comment, you are getting a chance to win a computer games and you’ll be giving $3 to a good cause.

So, do the right thing, and post a comment to give $3 to a good cause. Hey, you might even win a game!

Windows Vista, Your Activation Period Has Expired

Tuesday, July 3rd, 2007

So, yesterday, I installed and activated Photoshop, and then restarted my PC. Only to find a little surprise waiting for me on Windows booting.

I got a “Windows Activation” window saying that my Activation Period has expired! WTF? I activated Vista from day one, why is this happening!?!? So, it gave me some choices: Activate Online, Activate By Phone, Re-enter Product Key and Run Windows in Reduced Functionality Mode (basically you can only go online with IE7 to buy a new product key 😛 ). You could also close the Window and go to the “logged out screen” and either login (which brought up the Windows Activation Window) or Shut down/restart/sleep/etc your computer. In the bottom, right-hand corner it said “This copy of Windows is not Genuine”. What do you mean it’s not genuine? I bought it legally, and the day it was released, to boot.

I decided to press Activate Online. But, that failed, so I clicked close. It went to the login screen. So, I clicked my username and it brought me back to the Activation Screen. So, I clicked activate by Phone. Which gave me a number to call, and the numbers I’m supposed to punch in. But, wait, there were no numbers! Just blank spaces where the numbers should have been.

Okay, so I decided to close out that Window, and restart my PC. So, when it came back up, the Windows Activation windows was still there. Except, this time, it said “Windows has been activated successfully”! So, I close out of that Window, and log in. Everything seems fine. Except that it still says “This copy of Windows is not Genuine” in the bottom, right-hand corner!

So, I right-click on “Computer” and go “Properties”. I then scrolled to the bottom of the Window that came up and it said “Windows is activated”. Weird. So, I decided to Restart my computer, yet again.

So, I restarted, and when Windows came back up, everything was fine! So, maybe what happened was, when I installed Photoshop, some Windows system files got messed up, so when I restarted it said Windows wasn’t activated. But, after 2 more restarts, the files recovered and Windows was fine, and as it should be…

Hopefully, Windows won’t say my copy of Windows isn’t genuine, again…

Canada Day

Sunday, July 1st, 2007

Happy Canada Day to any Canadian readers out there! Sure, it’s only Canada Day for another 10 minutes or so, but it’s the thought that counts… right?…. right?

So, Happy Birthday, Canada!

I hope everyone had a great Canada Day!

Matt’s Blog Gets No-WWW.org Class B Compliance

Sunday, June 24th, 2007

I have just made it so that all traffic going to www.mattsblog.ca will be silently redirected to mattsblog.ca. Which makes Matt’s Blog a Class B (the preferred class) in No-WWW.org‘s books.

If you’ve never heard of no-www.org before, it’s basically a campaign trying to raise the fact that www. is/should be deprecated. They have 3 “ranks” or “classes”. Class A, B and C.

Class A All traffic to www.domain.com and domain.com is accepted, and no redirect happens.
Class B The preferred class. All traffic to www.domain.com is silently redirected (301) to domain.com.
Class C The hardcore class. Traffic to www.domain.com is denied and the user can only access the site through domain.com. This class is not recommended.

Most hosts default their DNS to Class A. Where all traffic to www.domain.com and domain.com is accepted. The problem with Class A is that Search Engines might penalize you for having duplicate content (because you have the same content on www.domain.com and domain.com) and you might end up with Search Results with and without the “www.“. You could even have 2 different PageRanks for your main page, depending on if you check with www. or no-www. Google allows you to define which domain you would like to show up in their Search Results. You can do this through Google Webmaster Tools. But, Google is only 1 of the many Search Engines.

So, how can you redirect www.domain.com to domain.com. Well, it’s actually quite simple. This way will only work on Apache servers with mod_rewrite enabled. First, create a file (or open it, if it already exists) in your site’s root called .htaccess (including the period, but nothing before the period). Then, place this code in it (replace domain\.com with your domain name, make sure you escape the period):

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://domain\.com/$1 [R=301,L]

Let’s go over that code now.

RewriteEngine On simply tells Apache to allow you to use the mod_rewrite module (make sure it’s installed, first).

RewriteBase / makes sure we’re working on the root domain.

RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC] tells the Server to see if the URI requested has the domain www.domain.com. The [NC] tells it that it’s case-insensitive.

RewriteRule ^(.*)$ http://domain\.com/$1 [R=301,L] says that if RewriteCond is true to silently redirect the user to domain.com. ^(.*)$ holds the value of what was after the original URI. $1 then makes sure that they’ll be redirected to the same page they requested. [R=301,L] will tell the User-Agent (browser, or bot) that the redirect type is 301 Permanent and and L tells the Server that it’s the last rule.

Note: If you’re using WordPress for the site in question, the above code must go above WordPress’ redirect stuff. So place it somewhere above # BEGIN WordPress.

Then, save the file and upload it to your site’s root. Now, all that’s left to do is to get Validated by no-www.org. Go here to do that. Your site should now be a Class B!

That’s it, your site is now even more Search Engine friendly.

Get it? Got it? Good!

BrowseHappy Logo is Gone in WordPress 2.3

Thursday, June 21st, 2007

WordPressIf you’ve ever used WordPress with Internet Explorer, you’ve probably seen that little logo at the bottom of the page. That logo is for BrowseHappy. Another campaign trying to get you to switch browsers. Well, I’ve got some good news for you. In WordPress 2.3, that BrowseHappy logo will no longer be there. Last month I wrote about how I submitted a Ticket and Patch to stop the BrowseHappy logo from showing up in IE7. Well, last night, after a little bit of discussion on the Ticket comments, I submitted a new patch that completely removed the BrowseHappy code from WordPress. Well, today, that patch has been committed into the WordPress Subversion Trunk (which will become 2.3). Changeset 5742 fixes it.

Sweet. 😀

Update [June 21, 2007]: Changeset 5744 now reverts Changeset 5742. Matt Mullenweg (founder of WordPress) wanted it reverted, since BrowseHappy is his site. Which is totally unfair, because these intrusive campaigns had a time, and they had a place. That time is no longer existent, and that place never should have been WordPress.