Harald Krottmaier wrote:
Hi!
I've noticed a problem when accessing the samples/-resource in a freshly
seeded project: index.xml is not automatically appended, so
forrest/cocoon (current svn-snapshot forrest_20050530043903.tar.gz)
reports a "Resource Not Found" error.
Putting the redirects (currently the last entries in sitemap.xmap) to an
earlier position, solves this problem.
OK I've diagnosed the problem. A request such as
http://localhost:/samples/
will be matched by:
raw.xmap contains:
So Forrest tries to read "{project:content.xdocs}/samples/", this is a
directory so Resource Not Found
There are a number of ways to fix this, but I'm, not sure which is best:
1) remove the "**" match in raw.xmap
This will result in some raw files not being served, we would have to
add specific matches for each content type. However, this will make the
redirect to index.html work for URLs ending with or without a '/'
2) change the match "**" to a regexp that says anything not ending with '/'
This will only prevent raw.xmap from matching URLs ending with a '/', in
other words http://lcoalhost:888/samples/ would work but
http://lcoalhost:888/samples would not work
(how would this regexp look? I'm not good with regular expression, even
simple ones like this)
3) change the first match (in sitemap.xmap) to only match filenames with
an extension
This assumes that there will be no raw content without an extension.
4) ???
Which should I implement?
Ross