Apache mod_rewrite – Melbourne IT – PHP-CGI

Ran into a problem trying to use mod_rewrite in .htaccess on a Melbourne IT hosting account.

They seem to run PHP as CGI instead of an Apache module. Read the differences here: http://blog.dreamhosters.com/kbase/index.cgi?area=2933

Here’s the rewrite script that worked in the end:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php [L,QSA]

The problem was a missing / before the index.php

Leave a Reply

Your email address will not be published. Required fields are marked *