SiteAccessRules -- how to declare a default access rule for nonmatching requests ?

Author Message

Volker Lenz

Sunday 26 January 2003 5:47:58 am

Is it possible to declare a default site access rule in ezp3 site.ini or elsewhere to cope with URIs that do not match any of the required patterns like "admin" or "user" in order to decide which access path to follow? I could not find an answer in the docs.
My concern is that without a default-rule we have to use apache mod_rewrite heavily in order to redirect any URL that does not show any valid ezp access rule pattern. I'd like to avoid this for the sake of my webserver's performance.

Adolfo Barragán

Sunday 26 January 2003 11:51:41 pm

> Is it possible to declare a default site access rule in ezp3
> site.ini or elsewhere to cope with URIs that do not match
> any of the required patterns like "admin" or "user" in order
> to decide which access path to follow? I could not find an
> answer in the docs.

Yes. In site.ini, under [siteSettings]

# Which page to show when the root index is accessed
IndexPage=/content/view/sitemap/2/

# What to do when a module does not exists, use either defaultpage or displayerror
ErrorHandler=displayerror
DefaultPage=/content/view/sitemap/2/

# Default access is needed when uri type matching is done, this is
# because with empty urls it's not possible to fetch the access
DefaultAccess=

So, you can set DefaultPage and DefaultAccess to match your needs.

Regards
Adolfo Barragán

Volker Lenz

Monday 27 January 2003 2:41:03 am

Thank you very much, Adolfo. That's exactly what I had not figured out.

Have a nice day.

Volker

> > Is it possible to declare a default site access rule in
> ezp3
> > site.ini or elsewhere to cope with URIs that do not
> match
> > any of the required patterns like "admin" or "user" in
> order
> > to decide which access path to follow? I could not find
> an
> > answer in the docs.
>
> Yes. In site.ini, under [siteSettings]
>
> # Which page to show when the root index is accessed
> IndexPage=/content/view/sitemap/2/
>
> # What to do when a module does not exists, use either
> defaultpage or displayerror
> ErrorHandler=displayerror
> DefaultPage=/content/view/sitemap/2/
>
> # Default access is needed when uri type matching is done,
> this is
> # because with empty urls it's not possible to fetch the
> access
> DefaultAccess=
>
> So, you can set DefaultPage and DefaultAccess to match your
> needs.
>
> Regards
> Adolfo Barragán

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 30 2025 21:46:03
Script start
Timing: Jan 30 2025 21:46:03
Module start 'layout'
Timing: Jan 30 2025 21:46:03
Module start 'content'
Timing: Jan 30 2025 21:46:03
Module end 'content'
Timing: Jan 30 2025 21:46:03
Script end

Main resources:

Total runtime0.0258 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 588.6328151.2734
Module start 'layout' 0.00610.0039 739.9063220.8594
Module start 'content' 0.01000.0141 960.76561,001.9297
Module end 'content' 0.02410.0016 1,962.695333.9922
Script end 0.0257  1,996.6875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002811.0540140.0002
Check MTime0.00114.3851140.0001
Mysql Total
Database connection0.00083.300210.0008
Mysqli_queries0.002610.080230.0009
Looping result0.00000.054610.0000
Template Total0.00114.410.0011
Template load0.00093.366810.0009
Template processing0.00031.013710.0003
Override
Cache load0.00062.348610.0006
General
dbfile0.00124.825880.0002
String conversion0.00000.026840.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