[Catalyst-dev] RT #24132: [WISH] redirect if missing trailing / from Catalyst root

Ash Berlin ash_cpan at firemirror.com
Wed May 28 14:54:57 GMT 2008


On 28 May 2008, at 15:49, Dave Rolsky wrote:

> On Wed, 28 May 2008, Brian Cassidy wrote:
>
>>
>> I'm running a Catalyst app at a non-server-root location, say
>> http://example.com/foo/. When accessing the app root properly with  
>> the
>> trailing slash, Catalyst correctly processes path '/'. However, when
>> requesting the URL without the slash (like http://example.com/foo)
>> Catalyst processes path '/foo' instead of '/'.
>
> I don't get this. What is the differnce between a path of "/foo" and  
> "/foo/"? Looking at RFC3986 it's hard for me to tell if the spec  
> intends that they be considered as different paths.
>
>
> -dave
>

In terms of hte spec, maybe nothing, but in practice

/foo is the file foo
/foo/ is the index file/aciton of the foo directory

Also consider the link <a href="bar">bar</a>

on /foo this will take you to /bar
on /foo/ this will take you to /foo/bar

I see the problem, but I'm not sure where the solution belongs (in  
catalyst or a rewrite rule for your webserver).

-ash




More information about the Catalyst-dev mailing list