IT Network Support, Web Development, Recruitment Consultancy

Archive for the ‘Techie’ Category

1&1 .htaccess / RewriteRule woes

Wednesday, April 2nd, 2008

Afternoon all,

I’m posting this in the hope that it gets picked up by search engines on how to solve this painful problem!

Let me set the scene: We designed a website for a client, who rather than use our wonderful dedicated hosting plan, decided they wanted to remain with their current host, 1&1. Fair enough, we don’t dictate where clients have to have their sites hosted, so long as they support PHP and .htaccess URL Rewriting, which 1&1 claim to do.

The first warning sign was when I realised an AddType wasn’t working. Apparantly, 1&1 don’t use the pretty much de-facto MIME type of application/x-httpd-php, instead preferring x-mapp-php4 and x-mapp-php5 for PHP 4 and 5 respectively.

However, the real headache came with actual URL Rewriting, for example redirecting /aboutus/ to /index.php?page=aboutus, it just WAS NOT working.

Lots of reports about it online, and many solutions that worked for others, but not for this. In the end, I ended up calling 1&1, who after 25 minutes, most of it being put back on hold to “check the information”, couldn’t grasp that the /aboutus/ directory was the problem as it didn’t exist. 3 times I told them “it doesn’t have to exist, the .htaccess file is supposed to catch that and send it to the right page. I’ve tested it on my dev box and it works fine!”

In the end I had to hang up before I lost my temper with her down the phone. Eventually, I finally stumbled across the solution! I stumbled across a blog by Elliott Back complaining of a very similar problem, albeit with WordPress permalinks. So I thought I’d give it a go, and it only bloody worked!

So here’s the solution:
In your .htaccess, add this to the top (or add it to your existing Options declaration):

Options -MultiViews

And here’s the reasoning, thanks to Elliott:

It turns out that 1and1 (without telling me) enabled the apache Multiviews setting, which plays havoc with the rewrite rules…
…Since I also had a file called archives.php, Apache couldn’t decide whether to apply the rewrite rules in .htaccess or the multiviews logic that said all /archives/ were really archives.php.

So a big thank you to Elliott for saving me from another life-shortening call to 1&1!

James.

15 Mins of Fame

Wednesday, August 9th, 2006

Now you might think this is a little strange coming from someone who has signed up to have their photos on the web.

But what is it with people and their ego’s these days? Everyone in the country is so desperate to get noticed! Now I am all for people being famous for actually achieving something. Look at Isambard Kingdom Brunel - he designed the Clifton Suspension Bridge, The Thames Tunnel and most of The Great Western Railway. I bet most people reading this have never even heard of him! He is less famous today than Nikki the airhead from Big Brother. All she has achieved is wearing very little and being constantly cold. We are from a country that has invented and built things like : - Disc Brakes, Cats Eyes, Fax Machines, The Electro Magnet, Penicillin. The Jet Engine, Television and even The Internet.

Years ago Britain was truly Great! We were one of 2 countries worldwide that had managed supersonic air travel for passengers, we had a huge motor trade (Aston Martin, Rolls Royce, Jaguar, TVR, Bentley etc)and some of the best manufacturing and development in the world. Heck 100 years ago we owned most of the world. So what happened? I’ll tell you what. We got greedy. Instead of making things that were renowned the world over for having British build quality and style we tightened the purse strings and outsourced. In pretty much every area we cut corners and have been bought out by the rest of the world.

People are far too concerned with the easy way out. “I don’t want to work because it is easier to collect dole and watch Tricia.” Is that the kind of attitude that built us an empire? I am not saying for one minute that we start invading countries and colonising again. (We seem to be helping the Americans with that enough as it is) But lets try and make Britain Great again.

I realise now after spending 5 minutes of my time writing this that I sound like a middle aged man with a chip on my shoulder. However I am under mid 20’s and can remember the things that we used to be good at….

So lets stop looking for the easy road to fame and think a bit more about what we can all do to make this a better place again.

Promote Firefox

Tuesday, June 6th, 2006

Spread this vid around! Hilarious stuff:

http://video.google.com/videoplay?docid=-8762512180812934446

A lick of paint…

Thursday, May 18th, 2006

As you may have noticed I’ve been fiddling around with the layout of the front page of the blog.

It now includes the avatars from our about us page and have been nicely blocked into a more almost “forum like” post style :)

Enjoy!
James.

Website Compliance

Friday, March 31st, 2006

The BBC today has reported on a study from the University of Southampton outlining poor quality HTML code in government websites. Why not check your own site against the W3C guidelines here. Comtecs have been specialising in W3C compliance for some time and would be glad to help anyone bring their site up to speed. Contact us for more information.

Organic LED (OLED) Keyboard

Wednesday, March 22nd, 2006

This is looking like the shape of things to come. Optimus have been showing samples of this keyboard on all the technical forums for a while now and it seems that they have a 3 button version working and ready for preorder. It will be interesting to see if they manae to pull this off. Imagine a keyboard with tiny screens under each key that can change to a shortcut icon depending on which progam you are using. We will have to wait and see if they actually work…

Stop Auto Updates restarting your computer

Thursday, February 16th, 2006

Morning all,

If, like me, you have automatic updates on, but have a tendancy to leave your computer on overnight with documents or other things open so it’s all there tomorrow, you will know just HOW annoying automatic restarts can be.

Thankfully, if you own Windows XP Professional, there is a solution:

Disable Auto Restart in Windows Update

Very useful stuff!

James :)

What’s your WPM?

Monday, February 13th, 2006

Fancy finding out just how quickly you can type?

And also if you’re faster than your colleagues? Then why not try the Typing Test on TypingTest.com.

I managed to score:
Gross: 58 WPM
Errors: 6
Net Speed: 52 WPM
Accuracy 89%

Also, still on the subject of typing skills, how quickly can you type the alphabet on a QWERTY keyboard? Find out here! My record is 4.718 seconds.

That’s it from me for today! Enjoy the rest of your day!

James.