[Zope] SiteAccess guidelines

Alexander Limi limi@stud.ntnu.no
Wed, 12 Jan 2000 22:51:22 +0100 (MET)


Zopistas,

I'm trying to use SiteAccess to do some redirection on our site. The main
idea is this:

All folders that do not exist should be redirected to another folder,
where they might or might not exist.

The way I've tried to implement this is as follows:

All calls to URLs except some selected few (more on this later) are
redirected to my "artists" folder. 

Eg: http://mp3.no/bandname is redirected to
http://mp3.no/artists/bandname.

The SiteAccess rewrite rule looks like this:

<dtml-unless "REQUEST.path and REQUEST.path[0][:6]=='manage'">
<dtml-unless "REQUEST.path and REQUEST.path[0]=='players'">
<dtml-unless "REQUEST.path and REQUEST.path[0]=='artists'">

[actual rewrite code]

This should except the folders [root]/artists, [root]/players and the
manage console.

But I would like to have the best way of redirecting everything, except
the root of the site and some subdirectories that I list. The above
solution is wildly inelegant :)

In addition, my crappy piece of redirect also redirects root, which it
shouldn't do.

To exemplify some more:

http://mp3.no should point to root
http://mp3.no/artists should point to /artists/index_html
http://mp3.no/players should point to /players/index_html
http://mp3.no/bandname should point to /artists/bandname/index_html
http://mp3.no/anything should point to /artists/anything

etc...

Evan, do you hear my call of distress? :)

Regards,


Alexander Limi
http://mp3.no