in reply to Re^2: Perl file names and extensions
in thread Perl file names and extensions

You are over thinking it. url.tld/foo/bar/, in apache, attempts to open whatever the default page for a folder is. In most installs of apache, url.tld/foo/bar/ resolves to url.tld/foo/bar/index.html However, you can change which file extensions you want the index page to use, for example, change it to .pl or .cgi. Then url.tld/foo/bar/ resolves to url.tld/foo/bar/index.pl and anything after the question mark is passed to that cgi. You'll notice perlmonks does something similar. The default page is index.pl so perlmonks.org resolves to perlmonks.org/index.pl so perlmonks.org?foo=bar resolves to perlmonks.org/index.pl?foo=bar

Replies are listed 'Best First'.
Re^4: Perl file names and extensions
by bradcathey (Prior) on Aug 04, 2004 at 02:03 UTC

    Thanks BUU, got it. Tried out with "index.cgi" and worked like a champ. Though it really gets complicated if I'm passing lots of params, because I first have to call index.cgi and pass something that tells which script to run and then all the params related to that script. So, instead of:

    url.tld/foo/bar/login?name=robert&pass=sf67dfs

    I believe I need:

    url.tld/foo/bar/?run=login&name=robert&pass=sf67dfs

    which doesn't get me that much further. I think I'm ready to go back to cgi-bin ;^)


    —Brad
    "Don't ever take a fence down until you know the reason it was put up. " G. K. Chesterton