<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks guys for your help.<br>
<br>
For clarity, I'd like to make the question webserver independent. For
now, I'm just talking about how to change the base url of an
application running in Catalyst::Engine::HTTP.<br>
<br>
In Catalyst::Manual::Cookbook, the author states that $c-&gt;uri_for is
great because it lets you "move an
application around without having to worry that everything is going to
break".<br>
<br>
Maybe this is a dumb question, but how do you "move an application
around" just in Catalyst::Engine::HTTP?<br>
<br>
Regards,<br>
<br>
-Pablo<br>
<br>
<br>
Peter Edwards wrote:
<blockquote cite="mid:00de01c838a9$3d0dc440$6a01a8c0@DRAGON1"
 type="cite">
  <pre wrap="">Presuming that the only semantic meaning of 'versionn.nn' is splitting which
handler to go to, you can do this from Apache 2 with mod_rewrite. (If you
wanted to handle the version.nn dynamically within the app you'd need to
hanle the URL processing inside your app.)

In the Apache configuration, e.g. /etc/httpd/conf.d/myspecialapp.conf

&lt;IfModule mod_rewrite.c&gt;
&lt;VirtualHost *:80&gt;
   RewriteEngine     On
   RewriteLogLevel   0
   RewriteLog        /var/log/httpd/rewrite.log

   RewriteRule       ^/myspecialapp/version1.2/(.*$)
<a class="moz-txt-link-freetext" href="http://localhost:2502/$1">http://localhost:2502/$1</a>  [P]
   ProxyPassReverse  /myspecialapp/version1.2/  <a class="moz-txt-link-freetext" href="http://localhost:2502/">http://localhost:2502/</a>

   RewriteRule       ^/myspecialapp/version1.3/(.*$)
<a class="moz-txt-link-freetext" href="http://localhost:2503/$1">http://localhost:2503/$1</a>  [P]
   ProxyPassReverse  /myspecialapp/version1.3/  <a class="moz-txt-link-freetext" href="http://localhost:2503/">http://localhost:2503/</a>

   RewriteRule       ^proxy:.* - [F]
&lt;/VirtualHost&gt;
&lt;/IfModule&gt;

Then run your version 1.2 app listening at localhost port 2502 and your
version 1.3 app listening at localhost port 2503.
Apache will map incoming <a class="moz-txt-link-freetext" href="http://myserver/myspecialapp/version1.2/">http://myserver/myspecialapp/version1.2/</a> on to
localhost:2502 and pass it path part /.
If Apache got back, say, path part /login it would return to the browser
<a class="moz-txt-link-freetext" href="http://myserver/myspecialapp/version1.2/login">http://myserver/myspecialapp/version1.2/login</a>.

Regards, Peter
<a class="moz-txt-link-freetext" href="http://perl.dragonstaff.co.uk">http://perl.dragonstaff.co.uk</a> 

On 6. des.. 2007, at 18.32, Pablo Collins wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi all,

I some catalyst apps whose different versions I'd like to make  
available by base path, like

<a class="moz-txt-link-freetext" href="http://mydomain/myspecialapp/version1.2/">http://mydomain/myspecialapp/version1.2/</a>
<a class="moz-txt-link-freetext" href="http://mydomain/myspecialapp/version1.3/">http://mydomain/myspecialapp/version1.3/</a>
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

    </pre>
  </blockquote>
  <pre wrap=""><!---->


_______________________________________________
List: <a class="moz-txt-link-abbreviated" href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a>
Listinfo: <a class="moz-txt-link-freetext" href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a>
Searchable archive: <a class="moz-txt-link-freetext" href="http://www.mail-archive.com/catalyst@lists.rawmode.org/">http://www.mail-archive.com/catalyst@lists.rawmode.org/</a>
Dev site: <a class="moz-txt-link-freetext" href="http://dev.catalyst.perl.org/">http://dev.catalyst.perl.org/</a>

  </pre>
</blockquote>
<br>
</body>
</html>