Image Download (3.3) needs changed Rewrite Rules?!

Author Message

Marco Zinn

Wednesday 24 December 2003 9:57:36 am

Yes, I was trying to find it in the docs, but i didn't.
I test-installed the 3.3 final with gallery image and have problem with the image downloading.
The Template creates Links like
[..]/content/download/347/1207/image/IMG_3580.jpg
or
[..]/content/download/346/1204/image/FUNCHAL2.JPG
While the second one worked, the first did not.

Debug: I installed using the "standard rewrite rules" for ez 3.x, which do NOT rewrite the common graphic formats (jpg,gif,png), because you will need them in the design of your site.
So, the first URL (*.jpg) does not get rewritten, but i guess the file does not physically exist at /content/download/.... So, it fails.
The second (*.JPG, uppercase letters!) gets rewritten to inde.php, processed by ez3 and starts the download.

That means: One must change the index.php rewrite rule or prepend one, that detects for (siteaccessname)/content/download

Is anyone familiar enought with rewrite rules? ;)
ez, please insert the Rewrite Rules to the install docs and take care of this... I didn't find it in the install part, just in the config/security corner: http://ez.no/developer/ez_publish_3/documentation/configuration/security/nonvirtualhost

Marco
http://www.hyperroad-design.com

Dominik Stoeppel

Tuesday 20 January 2004 2:51:46 am

hi marco,

have you found a solution for this ?

--

dominik

Marco Zinn

Tuesday 20 January 2004 8:34:25 am

No, I hoped, that ez would take care of it in the docs... but I don't see any info on the rewrite rules in the docs at all.

Now, from http://ez.no/developer/ez_publish_3/documentation/configuration/configuration/tips_tricks/exclude_uris_from_rewrite, I'd guess something like

RewriteRule ^/content/download/(.*)$ /<path-to-ez>/content/download/$1 [L]

This must be places before the "index.php"-rule and should take care of the URLs starting with /content/download/

If this works, some note would be good for everyone ;)

Marco
http://www.hyperroad-design.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 18 2025 11:13:41
Script start
Timing: Jan 18 2025 11:13:41
Module start 'layout'
Timing: Jan 18 2025 11:13:41
Module start 'content'
Timing: Jan 18 2025 11:13:41
Module end 'content'
Timing: Jan 18 2025 11:13:41
Script end

Main resources:

Total runtime0.5898 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 588.1641152.6563
Module start 'layout' 0.00560.0032 740.820339.5078
Module start 'content' 0.00880.5793 780.3281535.3047
Module end 'content' 0.58800.0017 1,315.632812.1094
Script end 0.5897  1,327.7422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.5710160.0002
Check MTime0.00140.2439160.0001
Mysql Total
Database connection0.00090.145010.0009
Mysqli_queries0.535890.8470570.0094
Looping result0.00080.1275550.0000
Template Total0.563095.520.2815
Template load0.00200.335720.0010
Template processing0.561095.125120.2805
Template load and register function0.00010.015810.0001
states
state_id_array0.00050.088510.0005
state_identifier_array0.00100.172220.0005
Override
Cache load0.00150.2588290.0001
Sytem overhead
Fetch class attribute can translate value0.00480.816720.0024
Fetch class attribute name0.00170.293840.0004
XML
Image XML parsing0.00060.100320.0003
class_abstraction
Instantiating content class attribute0.00000.001850.0000
General
dbfile0.00080.1348160.0000
String conversion0.00000.001740.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs