Mod_rewrite on BT Business hosting

Posted: July 23rd, 2012 | Author: | Filed under: .htaccess, BT, Internet, mod_rewrite, Programming | No Comments »

I was banging my head earlier with a mod_rewrite problem. The site in question is to be hosted on BT Business hosting. My mod_rewrite rules were running perfectly on my local MAMP environment, and on my test environment at Dreamhost. But it kept crapping out at BT.

Solution – it turns out that BT’s hosting needs the RewriteBase condition filled in. In my situation I was running the test software in a directory called ‘test’ so I needed to add

RewriteBase /test

to my .htaccess file.

When I move it out of ‘test’, to the full domain, I will modify .htaccess to

RewriteBase /

Hope that saves you a bit of head-scratching!