Rewrite rules causing Internal Server Errors

Author Message

led belly

Tuesday 06 February 2007 8:30:10 pm

Hello All,

I've recently been asked to move a site from one hosting company to another. I have a number of rewrite rules that worked fine on the old host provider but now causes Internal Server Errors on the new server. The Lines are as follows:

RewriteEngine On
RewriteRule ^/html/.* - [L]
RewriteRule ^/var/storage/.* - [L]
RewriteRule ^/var/[^/]+/storage/.* - [L]
RewriteRule ^/var/cache/texttoimage/.* - [L]
RewriteRule ^/var/[^/]+/cache/texttoimage/.* - [L]
RewriteRule ^/design/[^/]+/javascript/.* - [L]
RewriteRule ^/design/[^/]+/images/.* - [L]
RewriteRule ^/design/[^/]+/stylesheets/.* - [L]
RewriteRule ^/share/icons/.* - [L]
RewriteRule ^/extension/[^/]+/design/[^/]+/(stylesheets|images|javascripts?)/.* - [L]
RewriteRule ^/packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]
RewriteRule ^/packages/styles/.+/thumbnail/.* - [L]
RewriteRule ^/favicon\.ico - [L]
RewriteRule ^/robots\.txt - [L]
Rewriterule .* /index.php

The last line (Rewriterule .* /index.php) is what's causing the problem. When I remove it the erros go away but the site doesn't function properly.

Any ideas?

Thanks,
Jacob

PS: I also tried Rewriterule .* index.php (removing the /) and that took away the errors but then stylesheets were missing.

Bruce Morrison

Tuesday 06 February 2007 9:25:54 pm

Hi led

<b>Rewriterule .* /index.php</b> is going to try and run index.php from the DocumentRoot of the server. You need to check if the DocumentRoot is pointing to the right place i.e. do you have eZ installed in the webserver document root?

Also your webserver log entries may shed some light

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.