[Catalyst] URL Aliasing MyApp::Controller - Apache
Matt S Trout
dbix-class at trout.me.uk
Sun Aug 17 18:43:57 BST 2008
On Mon, Aug 11, 2008 at 05:53:46PM +0100, Stephen Shorrock wrote:
> Hi
>
> I was wondering whether anyone has experience of aliasing the Controllers of
> a Catalyst application within Apache.
>
> Essentially I would like the Controllers of my Catalyst application to have
> their own alias locations eg.
>
> MyApp::Controller::Area1 to have a URL http://someserver/area1alias
> and
> MyApp::Controller::Area2 to have a URL http://someserver/area2alias
>
> Rather than
>
> http://someserver/myapp/area1
> and
> http://someserver/myapp/area2
>
> respectively
>
> My current http.conf file is something like:
>
> <location /app/myapp >
> SetHandler perl-script
> PerlHandler MyApp
> </location>
>
> and I am able to ModRewrite / Alias so that the actions are handled (eg
> area1app -> /app/myapp/area1). The problem is that the catalyst object ends
> up with the incorrect $c->base, so that when I generate links using the
> $c->base value they are using the '/myapp/areaX' form rather than
> '/areaXapp' form.
If you're going to insist on using mod_perl anyway, why not just have two
apps and alias each one separately?
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/
More information about the Catalyst
mailing list