[Catalyst] REDIRECT_URL support
Andy Grundman
andy at hybridized.org
Mon Dec 5 17:40:57 CET 2005
Carl Franks wrote:
> The relevant excerpts from my httpd.conf are:
>
> DocumentRoot "d:/apache/www"
>
> <Directory "d:/apache/www/fig">
> RewriteEngine on
> RewriteRule (.*) /cgi-bin/fig_cgi.pl/$1
> </Directory>
>
>
> As you can see, the catalyst application is only served from the 'fig'
> sub-directory of the website root.
>
> Here is an example of 2 url's and the relevant ENV settings which are
> set for fig_cgi.pl :
>
> http://localhost/fig/
> 'REDIRECT_URL' => '/fig/'
> 'PATH_INFO' => '/',
>
> http://localhost/fig/bar/
> 'REDIRECT_URL' => '/fig/bar',
> 'PATH_INFO' => '/bar',
>
> The patch uses REDIRECT_URL, stripping PATH_INFO off the end, which in
> both cases leaves $base_path as '/foo'
Thanks, this is what I came up with for our test config and it passes
all tests. I've applied your patch.
ScriptAlias /cgi/ @ServerRoot@/tmp/TestApp/script/testapp_cgi.pl/
<IfModule mod_rewrite.c>
<Location /rewrite>
RewriteEngine on
RewriteRule /rewrite/(.*) /cgi/$1
</Location>
</IfModule>
-Andy
More information about the Catalyst
mailing list