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.

eZ debug

Timing: Jan 18 2025 16:20:08
Script start
Timing: Jan 18 2025 16:20:08
Module start 'layout'
Timing: Jan 18 2025 16:20:08
Module start 'content'
Timing: Jan 18 2025 16:20:08
Module end 'content'
Timing: Jan 18 2025 16:20:08
Script end

Main resources:

Total runtime0.0179 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0079 589.1719152.6406
Module start 'layout' 0.00790.0039 741.812539.4766
Module start 'content' 0.01180.0039 781.289189.3359
Module end 'content' 0.01570.0021 870.625030.3047
Script end 0.0179  900.9297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002212.5440140.0002
Check MTime0.00105.8635140.0001
Mysql Total
Database connection0.00126.500510.0012
Mysqli_queries0.005128.774030.0017
Looping result0.00000.089310.0000
Template Total0.001810.210.0018
Template load0.00084.628210.0008
Template processing0.00105.561010.0010
Override
Cache load0.00063.214310.0006
General
dbfile0.00021.134180.0000
String conversion0.00000.040040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs