views:

120

answers:

1

So I have an Apache .htaccess file that contains this:

RewriteEngine On
RewriteRule ^/(javascript/.*)$ /$1 [L]
RewriteRule ^/(styles/.*)$ /$1 [L]
RewriteRule ^.*$ /index.php

Unfortunately, the last line's coughing up a 500 error on the server that we've moved the code to. It works fine on my machine, Ubuntu 9.10 running Apache 2.2.12, but not on the server running Apache 2.2.14.

Is there any way to rewrite it so that the server doesn't return that error?

A: 

The following variations may work

RewriteRule ^/.*$ /index.php
RewriteRule ^.+$ /index.php
RewriteRule ^(.+)$ /index.php
RewriteRule ^/(.*)$ /index.php

I know that this one,

RewriteRule ^(.+)$ /index.php/$1 [L,QSA]

Works well for me on some of my mediawiki sites.

Bryan McLemore
"RewriteRule ^/.*$ /index.php" and "RewriteRule ^/(.*)$ /index.php" didn't cause errors, but they weren't doing anything in terms of redirecting the url.
Matthew