Bad Request on London Elects Website

It’s election time to find a new mayor for London soon, and what better way to get people to vote than by providing all the information about if you are eligible, how to register, or where you can vote by commissioning a nice shiny website that is available in nearly every language imaginable?

The answers is there isn’t :o)

Now imagine that you have a tv campaign to promote the existence of this website running across various local channels in London, you would have thought that some one, somewhere would notice that if you do not include the www. in http://www.londonelects.co.uk then you get a 400 – Bad Request http header.

If you are like me then you would probably cursor focus your address bar, then hit cmd + A to select the current url and just type in londonelects.co.uk, the browser would then add the http:// and send you onto http://londonelects.co.uk

As i already stated when you get there you will get a Bad Request error which seems pretty silly to me since i can imagine that a hell of a lot of people wont be typing the www. when typing in the domain.

Shouldn’t it be obvious to websites that are trying to promote themselves, to at least check if the non www version actually resolves to the website? Well you would of thought so.

It amazes me that these official websites can’t even get the basics down, so what should they do to fix it?

RewriteCond %{HTTP_HOST} !^www.londonelects.co.uk$ 
RewriteRule ^(.*)   http://www.londonelects.co.uk/$1  [QSA,L,R=301]

That simple piece of code can be placed in a .htaccess file and will redirect anyone who types the url without www to the url that includes the www, easy peasy :o)

Leave a Reply

3 Comments on "Bad Request on London Elects Website"

Notify of
avatar
Matt Bright
Guest

Hi Dean

I work for London Elects. Thanks for pointing out the error; I’ll have it fixed asap.

One thing – our “main” address is londonelects.org.uk, which does redirect if you forget the www, so we got some of the basics right…

matt

trackback

[…] i stated in my other post about LondonElects not 301′ing their site, i cannot believe that a company the size of fitness first cant hirer a developer who realises this […]

wpDiscuz