[Catalyst] configurable base url?
Andreas Marienborg
omega at palle.net
Fri Dec 7 06:18:41 GMT 2007
On 6. des.. 2007, at 18.32, Pablo Collins wrote:
> Hi all,
>
> I some catalyst apps whose different versions I'd like to make
> available by base path, like
>
> http://mydomain/myspecialapp/version1.2/
> http://mydomain/myspecialapp/version1.3/
> etc.
>
> I was planning on using a lighttpd or apache proxy to several
> Catalyst::Engine::HTTP processes running the different versions.
> That part is straightforward.
>
> What I'm hung up on is how to tell catalyst to throw away the /
> myspecialapp/version1.3 part of the url and start the controller
> matching from there. I'd like to not have to change the names and
> namespaces of the controllers based on their versions if possible.
>
> Instead I'd like to be able to put the application root url in the
> config and have it just work.
>
> Is this possible / relatively easy to do?
>
> Thanks much.
>
> -Pablo
>
Uhm, if you configure your webserver to send /version12/ to one
instance of HTTP (I would use fastcgi), and then in your application
use uri_for to generate urls, the root should be set and appended
automaticly. I rely on this all the time when developing, and it works
quite nicely, untill someone forgets to use uri_for in one place :)
- andreas
More information about the Catalyst
mailing list