[Catalyst] Help with static and RegEx
Will Hawes
info at whawes.co.uk
Wed Jun 29 11:00:08 CEST 2005
I think ideally Catalyst should test for that and throw an error.
wh
----- Original Message -----
From: Mike McKay <mike at vdomck.org>
To: The elegant MVC web framework <catalyst at lists.rawmode.org>
Sent: Wed, 29 Jun 2005 09:48:19 +0100
Subject: Re: [Catalyst] Help with static and RegEx
> Answering my own question:
>
> Mike McKay wrote:
> > So I am trying to serve all static pages out of the root directory.
> > Should be simple, but I am having trouble. It seems that the regex
> > matches, but then the handler doesn't execute:
> >
> > # match anything after the slash that is not a slash
> > sub files : Regex('/*([^/]*\.(css|js|html))$') {
>
> <snip/>
>
> > code in the files method it never shows it. What is happening?
>
> From the documentation:
> ---
> If you want to pass variable arguments at the end of a URL, you must
> use regex actions keys with '^' and '$' anchors, and the arguments must
> be separated with forward slashes (/) in the URL
> ---
>
> So boys and girls, today Mike learned that all RegEx URL handlers need
> to start with a caret.
>
> Cheers,
> Mike
>
>
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
>
>
More information about the Catalyst
mailing list