.htaccess help

Author Message

Softriva .com

Friday 02 April 2010 1:58:27 am

what are these lines for in .htaccess

<FilesMatch ".">
order allow,deny
deny from all
</FilesMatch>

<FilesMatch "(^index\.php|favicon\.ico|index_treemenu\.php|\.(gif|jpe?g?|png|css|js|swf|html?)|var(.+)storage.pdf(.+)\.pdf)$">
order allow,deny
allow from all
</FilesMatch>

Bertrand Dunogier

Friday 02 April 2010 2:35:54 am

The first, FilesMatch "." will deny access to every file. I would by the way say this is wrong, since . will only match any character once... and it is not likely that we will have files with one letter names :)

The next one will allow access to known ezpublish files, only the ones that can be directly requested from the browser.

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

Softriva .com

Friday 02 April 2010 5:19:12 am

Should I remove the first part from .htaccess?

Thx

Bertrand Dunogier

Friday 02 April 2010 6:08:24 am

Nope, but you can fix it by replacing "." with ".+"

Actually I need to start thinking straight: "." will match any file, no need for a + here, since there are no ^ nor $. So you can leave it as it is, it is correct.

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

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 04:15:10
Script start
Timing: Jan 18 2025 04:15:10
Module start 'layout'
Timing: Jan 18 2025 04:15:10
Module start 'content'
Timing: Jan 18 2025 04:15:11
Module end 'content'
Timing: Jan 18 2025 04:15:11
Script end

Main resources:

Total runtime1.3924 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 588.9063152.6094
Module start 'layout' 0.00550.0031 741.515639.4141
Module start 'content' 0.00851.3821 780.9297541.6953
Module end 'content' 1.39070.0017 1,322.625012.1953
Script end 1.3923  1,334.8203 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.2525160.0002
Check MTime0.00140.1016160.0001
Mysql Total
Database connection0.00080.058310.0008
Mysqli_queries1.335195.8826600.0223
Looping result0.00070.0482580.0000
Template Total1.358697.620.6793
Template load0.00230.165820.0012
Template processing1.356397.408520.6781
Template load and register function0.00030.019810.0003
states
state_id_array0.00090.062710.0009
state_identifier_array0.00130.091920.0006
Override
Cache load0.00180.1293160.0001
Sytem overhead
Fetch class attribute can translate value0.00420.299820.0021
Fetch class attribute name0.00150.106150.0003
XML
Image XML parsing0.00090.061520.0004
class_abstraction
Instantiating content class attribute0.00000.001060.0000
General
dbfile0.00110.0817160.0001
String conversion0.00000.000740.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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs