Jump to content

mod_perl behavior


janos.gonzales

Recommended Posts

Hi,

I realize this is a PHP forum, and I'm asking a Perl question.  But this is really an Apache question so don't get mad please :).

 

I am trying to build a CGI script so that when my Apache server is asked for <b>http://myserver.com/test/123.pdf</b> then the CGI script fires up and serves the file. 

 

The reason for this is that the file does not really exist in the 'test' folder at all but on a different machine. I figured out how to get the CGI script to copy this file and serve it and 'fool' the browser into thinking it's loading a PDF. What I need now is for the address in the url to be <b>http://myserver.com/test/123.pdf</b>  not <b>http://myserver.com/test/script.pl</b> .  This is so that when the file is saved it's saved with its real name not as a PDF with a wrong .pl extension. 

 

Do I have to use mod_perl for this? Or is there an easier way?

Link to comment
https://forums.phpfreaks.com/topic/95872-mod_perl-behavior/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.