31 Oct
2011
31 Oct
'11
8:18 a.m.
On 31/10/11 05:30, Joel Roth wrote:
[1] http://mydomain.com/audio [2] http://mydomain.com/audio/foo
URL [1] is converted to the file path ./pages/audio.txt, which is rendered from Markdown to HTML and returned.
I expect URL [2] to similarly return a rendered form of ./pages/audio/foo.txt, but what I receive is 404.
This doesn't match /audio/foo - the "*" splat only matches one level of the url (it stops at "/"). get '/*' => sub { my ($match) = splat; render_markdown($match) }; You either want: '/*/*' if you'll only ever have two levels to match or use the "megasplat" "/**" which will return a list. See docs for more. -- Richard Huxton Archonet Ltd