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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.