Forums / Install & configuration / Image Download (3.3) needs changed Rewrite Rules?!

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

eZ debug

Timing: Jan 30 2025 16:30:35
Script start
Timing: Jan 30 2025 16:30:35
Module start 'content'
Timing: Jan 30 2025 16:30:35
Module end 'content'
Timing: Jan 30 2025 16:30:35
Script end

Main resources:

Total runtime0.3860 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0103 588.1797370.2656
Module start 'content' 0.01030.0150 958.44531,001.6250
Module end 'content' 0.02530.3607 1,960.07033,891.5391
Script end 0.3860  5,851.6094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00481.2465200.0002
Check MTime0.00140.3734200.0001
Mysql Total
Database connection0.00110.275910.0011
Mysqli_queries0.278872.21691410.0020
Looping result0.00170.44601390.0000
Template Total0.360393.310.3603
Template load0.00080.213710.0008
Template processing0.359493.105810.3594
Override
Cache load0.00060.146110.0006
Sytem overhead
Fetch class attribute can translate value0.00180.464210.0018
XML
Image XML parsing0.00040.098410.0004
General
dbfile0.00962.4911200.0005
String conversion0.00000.001830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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