Rewrite rules doesn't work apache 1.3

Posted by Sander Versluys on Stack Overflow See other posts from Stack Overflow or by Sander Versluys
Published on 2010-05-01T14:52:00Z Indexed on 2010/05/01 14:57 UTC
Read the original article Hit count: 265

Filed under:
|

I'm using a couple of rewrite directives that always works before on apache2 but now i'm uploaded to a shared hosting and the rewrite rules do not seem to get applied.

I've reduced the my .htaccess files to the following essential rules:

RewriteEngine On
Rewritebase /demo/

RewriteRule ^(.*)$ index.php/$1 [L]

As you can see, i want to rewrite every request to my index.php file in the demo folder from root.

So everything like http://www.example.com/demo/albums/show/1 should be processed by http://www.example.com/demo/index.php for a standard MVC setup. (I'm using CodeIgniter btw)

The directives above results in a 500 error, so i thought maybe because of some possible syntax differences between 1.3 and 2.x.

After some trail and error editing, i've found the rewrite rule itself to be at fault but i really don't understand why.

  • Any ideas to why my rewrite rule doesn't work? it did before on lots of different servers.
  • Suggestions how to fix it?

Note: mod_rewrite does work, i've written a small test to be sure.

© Stack Overflow or respective owner

Related posts about apache

Related posts about mod-rewrite