RewriteRule working local but not on remote server

Posted by m0tv on Pro Webmasters See other posts from Pro Webmasters or by m0tv
Published on 2012-03-30T07:33:00Z Indexed on 2012/03/30 11:42 UTC
Read the original article Hit count: 252

Filed under:
|

I have a .htaccess file with one simple RewriteRule:

RewriteEngine on
RewriteRule ^([A-Za-z0-9-]+)$ ?site=$1

I want to have an url like http://www.example.com/imprint and forward it to http://www.example.com/?site=imprint

I checked this rule with an RewriteRule tester which gave me the results I want to achieve. On my local development system it works well too.

But on a remote server the URLs just give me a 404 error. Other more simple rewrite rules are working with no problems, so everything must be set up correctly (I think..). The problem is that I don't have access to any error logs or the server configs. So the only thing I can do is to guess...

Can anyone tell me if theres something wrong with this rule? Or anything else I can do or test to solve this? Or has someone an idea what could be wrong on the server?

© Pro Webmasters or respective owner

Related posts about htaccess

Related posts about mod-rewrite