Posts about Web

htaccess Subdomain Redirection

August 8th, 2008

My blog is set up as a subdomain to my main site so http://bobpeers.com/blog/ should really serve the content from http://blog.bobpeers.com.

Just recently I noticed that link pointing to my blog directories but accessed through the main site were not returning 404 pages for missing pages. For example a link pointing to http://bobpeers.com/blog/page-not-here would just serve the content from http://bobpeers.com. To force requests to the blog to be server by the subdomain i just added this line to my .htaccess file.

Redirect permanent /blog http://blog.bobpeers.com

Now any request for a page under the blog subdirectory will be permanently (http code 301) redirected to http://blob.bobpeers.com, so for example:

request http://bobpeers.com/blog/2008/08/page
serves http://blog.bobpeers.com/2008/08/page

Fedora 9 No Sound on Flash Videos

August 2nd, 2008

After living with no sound on flash videos since I installed Fedora 9 ( I don’t watch many videos as you may have guessed :-) ) I decided to look for a fix tonight. It turned out to be much simpler than I imagined, I should have done it ages ago!

For reference I had all other system sounds but the controls on the playback page of the Pulse Audio Volume Control just flickered.

Just install libflashsupport as root and you’re good to go.

# yum install libflashsupport

Found on this page, http://clunixchit.blogspot.com/2007/11/firefox-no-sound-on-flash-videos.html.

Turn Off Post Revision In WordPress 2.6

July 25th, 2008

The title says it all. This page describes how to do it and to stop the wp_posts table filling up with multiple copies of the same post.

Public Domain File Icons

July 25th, 2008

I was looking for some small file icons to use in a web page on a company Intranet site. I found some icons at splitbrain.com that are in the public domain and so are free to use/modify/do whatever you feel like for personal or commercial use.

Maybe Time to Change the Web Server?

July 13th, 2008

I was visiting a page on the Global Acer site when I came across this error message.

Too many connections in IIS 5.0

If you read the Microsoft Support pages on this error it seems that they exceeded the 10 connection allowed, I wonder if this is the first time that’s happened! Maybe they should try Apache instead ;-)

My Favorite xkcd Comic Strips

April 8th, 2008

Here’s my current favorite xkcd comic strips.

If only life were this easy!

Sandwich

A lesson for the unwary.

Exploits of a Mom

The Internet Without Adblock Plus

April 5th, 2008

Mozillia released Firefox 3 beta 5 a few days ago so I upgraded from the beta 4 release. Unfortunately the Adblock Plus addon has not been updated yet.

I’ve been using this addon for so long and have it installed whenever I install Firefox on a computer that I’ve completely forgotten just how many annoying adverts there are on many web sites I visit. On top of that they slow down my browsing while I wait for some massive Flash movie to load or some other useless ad.

It’s so bad that I’ve actually gone back to using Firefox 2.0.0.13 that I also have installed, just to avoid the ads. Of course now I have the problem that I’ve got so used to Firefox 3 betas that going back to Firefox 2 is also pretty hard…

Enable gzip Compression in Wordpress 2.5

April 4th, 2008

I only noticed today that the gzip compression option was removed from Wordpress 2.5. Apparently this was done as it’s easy to acheive the same thing using mod_deflate on Apache.

The problem is that my host uses Apache 1.3 and also doesn’t have mod_gzip installed so I had no choice but to do this in PHP.

Fortunately I came across this plugin that re-enables gzipping of pages saving me bandwidth and my visitors downloading time.

Firefox Windows Authentication

March 27th, 2008

If you want to use Firefox to access a corporate intranet then you will need to enable Windows Authentication. Simply enter about:config in the location bar and locate the following key:

network.automatic-ntlm-auth.trusted-uris

Enter the domains you wish to access separated by commas. For example, if your intranet was located at http://intranet/ then you would just enter the value ‘intranet’ (without quotes).

Updated Wordpress Theme

March 18th, 2008

After initially using the Digg 3 Column theme I decided to go for a more minimalistic theme. Inline with my main site having virtually no images I decided an image free theme would be best.

As a bonus this means faster page loads and smaller bandwidth on my web host. I also just like the simplicity of the new theme, it gives far more priority to the text which after all is what a blog is all about.

After some searching I found the White as Milk theme which then led me to Skimmed Milk, my current theme.

I use a XHTML 1.1 Doctype on my main site so I decided to try the same with my blog. It was actually surprisingly easy to do (including serving the page as Content-Type: application/xhtml+xml) and just required some minor edits of the functions.php file in the theme folder.

For my own sake I like the fact that in Mozilla browsers pages completely break if you send invalid markup using this content type, at least they are easy to notice and fix. I’m also so used to writing pages that conform to a XHTML 1.1 Doctype that most of my pages validate first time.