Problems with rewrite rule

Author Message

Massimo Sanna

Friday 27 May 2005 1:31:01 pm

Hi there,
in my hosting platform, the virtual host is configured like this:
domain.com accepts some aliases like /awstats /eaccelerator, to manage the services.
www.domain.com redirects to the document root of ezpublish.
Inside the ezpublish directory they placed a .htaccess which provides the rewrite functions, but in this way I see /index.php/ in the url. I know I could modify my site.ini.append.php to make it work with index.php, but I'd prefer not to see that in the url. If I put the rewrite rule in httpd.conf it works fine but the extra statistics services and cache management pages are being redirected to ezpublish which answers with a module not found as usual.
What can I do? Is the rewrite rule exception the only way to solve this?

The best solution for me would be to keep the rewrite in my .htaccess file, and leave httpd.conf without it, since HSP platform is known to overwrite config files when the admins install some system upgrades...

kracker (the)

Friday 27 May 2005 2:57:38 pm

I'm sure your hosting provider's support would tell you that you can include exclude commands into your .htaccess file to do exactly what you need. Be sure to add the these RewriteCond before your primary RewriteRule for these to work in your .htaccess

RewriteEngine On

RewriteCond %{REQUEST_URI} !^/favicon.ico*
RewriteCond %{REQUEST_URI} !^/awstats*
RewriteCond %{REQUEST_URI} !^/eaccelerator*

RewriteRule !\.(gif|ico|jpe?g|png|css|js)|var(.+)storage.pdf(.+)\.pdf$ index.php

Optionally you may want / need one of these (depends):

DirectoryIndex index.php

//kracker
<i>eminem : stimulate</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

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 19 2025 04:22:08
Script start
Timing: Jan 19 2025 04:22:08
Module start 'layout'
Timing: Jan 19 2025 04:22:08
Module start 'content'
Timing: Jan 19 2025 04:22:09
Module end 'content'
Timing: Jan 19 2025 04:22:09
Script end

Main resources:

Total runtime0.8563 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0079 590.7031152.6406
Module start 'layout' 0.00790.0031 743.343839.4609
Module start 'content' 0.01100.8438 782.8047537.4141
Module end 'content' 0.85480.0015 1,320.218812.1641
Script end 0.8563  1,332.3828 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.4797160.0003
Check MTime0.00200.2338160.0001
Mysql Total
Database connection0.00130.147610.0013
Mysqli_queries0.804193.8987540.0149
Looping result0.00060.0645520.0000
Template Total0.817195.420.4086
Template load0.00240.280820.0012
Template processing0.814795.139120.4074
Template load and register function0.00020.023910.0002
states
state_id_array0.00110.133010.0011
state_identifier_array0.00090.107320.0005
Override
Cache load0.00200.2369190.0001
Sytem overhead
Fetch class attribute can translate value0.00100.115020.0005
Fetch class attribute name0.00170.203640.0004
XML
Image XML parsing0.00260.306320.0013
class_abstraction
Instantiating content class attribute0.00000.000940.0000
General
dbfile0.00240.2759240.0001
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs