RE: Hiding the .pl

2003-03-19 Thread KIVES,BRUCE (HP-USA,ex1)

mod_rewrite looks like it will be the correct way to go in the future, but a
half dozen Alias got the site working again quickly.

I thought that Alias was only good for aliasing directories. It can be used
for individual files.

For future reference, using my example:
http://url/calendar/month/042003.htm
where month was really month.pl, the command is 
Alias /calendar/month/ "/opt/apache/htdocs/calendar/month.pl/"

Remember to use the final / in both sides.


Much thanks to Magnus, Perrin, and Robert for their quick responses.

-Bruce Kives



-Original Message-
From: Perrin Harkins 
Subject: Re: Hiding the .pl

KIVES,BRUCE (HP-USA,ex1) wrote:
> Any other ideas on how to hide the .pl ?

There are dozens of ways to make /calendar/month run month.pl.  Here are 
some simple ones:

- mod_rewrite
- Alias
- DirectoryIndex month.pl

You could also turn month.pl into a handler and just do this:


SetHandler  perl-script
PerlHandler Month


- Perrin


Hiding the .pl

2003-03-19 Thread KIVES,BRUCE (HP-USA,ex1)

I have recently updated from Apache 1.3.23? to 1.3.27. Things are behaving
differently, and I think the problem lies with mod_speling. Previously, if
there was only one possible choice for a misspelled URL, it would just
redirect it without asking. Now it asks every time. 

I used this feature to hide the fact that I was using a Perl program. For
example: http://url/calendar/month/042003.htm called month.pl with
PATH_INFO=/042003.htm, but to the browser it looked like there was a
directory /month with a pile of static pages. I have several file.htm.pl
that are called with file.htm and it worked fine.

Was there a change in mod_speling, or has something else happened? I don't
think it is in the configuration. I copied over the old httpd.conf and after
one or two minor changes, restarted Apache with the same problem. 

Is there another way of hiding the fact that I'm using a Perl program? If I
rename the program from month.pl to month, it displays the program instead
of executing it. The permissions are 755. I don't want to copy everything
into /cgi-bin, because I do have some static .html in the same directory,
which it then tries to execute.

Any other ideas on how to hide the .pl ?

OS revision: 
HP-UX 11.11
>From the error log: 
HP Apache-based Web Server/1.3.27 (Unix) ApacheJServ/1.1.1 PHP/4.2.2
mod_perl/1.27 configured
-- resuming normal operations

Thanks in advance,
Bruce Kives