I'm developing a Catalyst application and having trouble with the way Catalyst
interprets urls.
Let's say that in our Catalyst application we have a controller Account
. If this is the case, Catalyst will interpret
http://mydomain.com/account
andhttp://mydomain.com/account/
as the same url for the index action.
However, for SEO and linking purposes (and just to be consistent overall) I would like to force Catalyst to only recognize one format and stick to it.
I've found one module that seems to be built for this: Catalyst::Plugin::SanitizeUrl, it's documentation says you should just put
use Catalyst 'SanitizeUrl';
in myapp.pm
and this will handle everything for you.
However, whenever I use it I just get this error:
Bad request
On every page load. Does anyone know of a simple way to have Catalyst only use one format?