in reply to Catalyst - Add Trailing Slashes to URLs

Personally, I'd use mod_rewrite to append the / to any URIs that don't end in an extension from a defined set - probably \.(html?|css|jpg|gif|png|ico)$ - rather than having Catalyst do it, on the assumption that anything handled by Static::Simple will be ending with one of those extensions.

Replies are listed 'Best First'.
Re^2: Catalyst - Add Trailing Slashes to URLs
by Sixtease (Friar) on Dec 02, 2008 at 16:33 UTC

    But if I'm not mistaken, then this would not add the slash in the user agent. And that's where it is essential because of relative links

    use strict; use warnings; print "Just Another Perl Hacker\n";
      By default you are correct, but adding [R] to the end of your RewriteRule will cause it to do a client-side redirect instead of handling it internally.