mod_rewrite failing on Heart Internet

Hi guys,

Having a bit of trouble with my .htaccess file on Heart Internet hosting - the identical htaccess file runs no problem on the other two hosts I use plus on my local machine.

I just want to route every request that’s not for an existing file to site.php. This is what I generally use:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .? site.php [L,QSA]

But on Heart Internet I get a weird message: “The requested URL /home/sites/[domain name removed]/public_html/site.php was not found on this server.”

A Google search has uncovered the following (similar mod_rewrite problems on Heart Internet):

(I’m not using Code Igniter by the way, just a regular PHP web app but I doubt it matters as this is at the server level)

I’ve tried the solutions in the links but they don’t work either. :frowning:

Can anyone help??

Many many thanks in advance!


Do you have a site.php file in your DocumentRoot? If you do, then the 404 is the error.

I’m not a Heart Internet user but I’d suspect that they have crippled either your .htaccess or mod_rewrite. The ONLY thing you can do is to contact your support with them to ask about that.



Hi David, thanks for the answer. Yes, I had the site.php in the root folder!

Everything seems to be working now, apparently it was because my domain hadn’t properly propagated itself across their system, though I’m not sure why would that make a difference since I was using the temporary URL anyway.

Thanks again!