I'd love to hear more from others about this but I believe ScriptAliasing is
VERY MUCH ALIVE in mod_perl. I kept reading that you can't use ScriptAlias
with mod_perl. Fine. True. But I read that as a death sentence to having
pretty URL's with mod_perl. With that statement, it should say "To use
ScriptAliases with mod_perl, simply rename them to Alias."
This is what I put in my Apache 1.3.12 installation and mod_perl 1.22
httpd.conf file:
Alias /printer /www/circles_cgi/printenv.cgi
and it works! People need to know that you can get the same effect that a
ScriptAlias gives you with an a straight Alias, as long as you the script
called (printenv.cgi) is flagged as a mod_perl script under a <Files> tag or
<Location> tag.
How did I get this to work? Why hasn't anyone else figured this out? Am I
just preaching the obvious here? Sure seemed to me that any type of
"ScriptAlias" was DEAD under mod_perl.
Cliff
-----Original Message-----
From: Kenneth Lee [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 27, 2000 1:02 AM
To: Cliff Shaw
Cc: [EMAIL PROTECTED]
Subject: Re: ScriptAlias hacking?
if i understand correctly, you should have in your httpd.conf something
like
<Location "/bar">
SetHandler perl-script
PerlHandler Your::Handler
Options +ExecCGI
</Location>
then, in your module
package Your::Handler;
sub handler {
my $r = shift;
my $path_info = $r->path_info;
...
}
1;
i'm fairly new to mod_perl, so pls correct/criticize if there's anything
wrong.
kenneth
Cliff Shaw wrote:
>
> HI all,
>
> This is my first post to the list so hopefully I don't screw it up. I am
> attempting to do the following with mod_perl and am stumped on
> ScriptAliases.
>
> I want to have www.foo.com/bar/ run a mod_perl script. Simple huh? yes.
> Except I want to you use PATH_INFO to create directories (so to speak) in
> bar. So www.foo.com/bar/test/whatever
> would not look for a directory but rather call the bar script and send in
> the PATH_INFO, all of this has ruled out the possibility of using an
> index.cgi
>
> Any help?
> Thanks
> Cliff