http://qs321.pair.com?node_id=54913


in reply to Serving files without revealing their location

if you're using a real web server like apache, then you should look into mod_rewrite or mod_redirect (which are Apache modules and have essentially nothing to do with Perl). The latter is easier to use but less flexible. They will allow to spoof the URL to whatever you want and return a file. You could send all requests through a CGI, but I see that as wasteful and recreating what the web server was supposed to do in the first place.
AgentM Systems nor Nasca Enterprises nor Bone::Easy nor Macperl is responsible for the comments made by AgentM. Remember, you can build any logical system with NOR.

Replies are listed 'Best First'.
Re: Re: Serving files without revealing their location
by sutch (Curate) on Jan 30, 2001 at 01:15 UTC
    If you're using Apache, then setting up an Alias with a CGI script handling the requests will do the trick. I've used this often to create fake, dynamic paths that are parsed by Perl to determine what script to run or document to return.