Skip to content


www and non-www for WordPress using htaccess (canonicalization)

WordPress uses .htaccess to rewrite the urls for pages, as WordPress calls it, making ‘pretty urls.’ This can however, lead to some confusion when trying to sort out canonicalization issues so that WordPress only uses www or non-www urls. There are a number of plugins that claim to take care of this for you but you can’t beat editing htaccess yourself.



Redirect www.domain to non-www.

Replace the existing WordPress htaccess code with the following (obviously changing the domain to yours):

# BEGIN WordPress

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.yourdomain\.com$ [NC]
RewriteRule ^(.*)$ http://yourdomain.com/$1 [R=301,L]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

and for non-www to www.domain

# BEGIN WordPress

RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain\.com$ [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301,L]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

Posted in Blogging, Internet.


Firefox takes ages to load

So you have the latest hardware (or not) but Firefox browser is taking ages to load, sometimes several minutes, and you are just about ready to take a hammer to your computer to ‘fix it the old-fashioned way.’ Wait! You can fix this particularly annoying irritation with a nifty little application that runs in the background on your computer called Firefox Preloader or if you really want, you can make the necessary changes manually.



What preloader does, as the name suggests, is preload Mozilla Firefox components into memory so that when you decide to launch Firefox, it only takes a second or two.

I’m running a hex core processor on the latest motherboard stuffed full of RAM and I was still waiting several minutes for FF to eventually get around to appearing on my monitor, so all the internet ‘advices’ that people should upgrade their hardware or just that ‘their computer isn’t up to the job’, are wrong. All the people wondering why Firefox takes so long to load should read the next little bit.

Why does Firefox take so long to load?
The Mozilla developers decided not to tie up system resources by preloading Firefox components during system start up so when you launch Firefox after you’ve started your computer it has to fetch all of the components it requires and it’s this that takes time. It shouldn’t take more than a few seconds in theory but in practice, at least for some users, it can take 30 seconds to several minutes.

Microsoft on the other hand, preload components for Internet Explorer during start up so it launches faster.

Shut up and get to the point.
Okay, okay, I get it. You’re impatient and this crap has been going on for long enough. “Never mind telling me why Firefox takes so long to load up, just tell me how to fix it!

Note: both methods have their drawbacks.

Automatically with a bit of software called Firefox Preloader – download from the link at SourceForge.
Drawback: it doesn’t free the memory used by FF so if you experience FF memory-creep where it gradually takes up more and more RAM, using the preloader will keep that in memory. The only way to get around that is File > Exit which kind of defeats the point. On the plus side, at least FF will launch quickly after a system start.

Manually tell your computer to prefetch the components during startup.
Drawback: doesn’t preload everything in the way that FF preloader does so it still takes a while to launch.

Put a shortcut to Firefox in the Start Menu. If it doesn’t already exist in the Start Menu simply drag a shortcut for Firefox onto the little area beside the Start Button.

Now Right Click on the shortcut > Properties

Firefox Properties dialogue box appears.

Where it says ‘Target‘ you need to add ‘/Prefetch:1′ to the end of the line so that it now reads, “C:\Program Files\Mozilla Firefox\firefox.exe” /Prefetch:1

Save it (ok button).

It should look like this:

Now Firefox will preload components during syatem start up and won’t takes ages to load.

Posted in Computers.