[Catalyst] REDIRECT_URL support
Carl Franks
fireartist at gmail.com
Mon Dec 5 16:32:16 CET 2005
On 02/12/05, Andy Grundman <andy at hybridized.org> wrote:
> Thanks. For testing, we just need a set of Apache config directives
> which run the TestApp using a RewriteRule. I couldn't get it to work
> the other day when I tried to set it up, so I removed the patch. See
> t/conf/extra.conf.in and t/optional_apache-cgi.pl for the current CGI
> test setup.
>
> If you can send your working config I can take it from there.
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'
And just to clarify - I'm know there's already documented ways to
achieve my aims which already work, however I have to use the
RewriteRule method because I don't have permissions to use Alias or
ScriptAlias in my .htaccess files.
Cheers,
Carl
More information about the Catalyst
mailing list