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.