[Catalyst] offset the URI of an existing Cat App
Jim Spath
jspath at pangeamedia.com
Tue Jul 7 14:01:02 GMT 2009
Octavian Râsnita wrote:
> But if in the templates you use urls like:
>
> <a href="/user">...</a>
>
> you need to change them to urls like:
> <a href="[% c.uri_for('/user') %]">...</a>
There is an alternative to using uri_for in every link:
<base href="[% c.request.base %]">
...
<a href="user"></a>
This method will work whether your deployment is at the base of the
domain, or a subdirectory.
We used this method so that we could run applications under user
directories:
http://dev.server.com/~someuser/app1/
But then on production have them run at the base of their domain.
http://app1.domain.com/
- Jim
More information about the Catalyst
mailing list