Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: what to use create, .html or .cgi

by andrew (Acolyte)
on Sep 27, 2002 at 18:46 UTC ( [id://201295]=note: print w/replies, xml ) Need Help??


in reply to Re: what to use create, .html or .cgi
in thread what to use create, .html or .cgi

I honestly dont get wut u mean here how is myscript a script its a folder????

Replies are listed 'Best First'.
Re: Re: Re: what to use create, .html or .cgi
by seattlejohn (Deacon) on Sep 27, 2002 at 20:05 UTC
    Think of the URL less literally as a directory path, and more as a string that gets passed to the Web server to tell it where to look for a file to serve.

    Let's say you have a server whose docroot is at ~myname/httpd. This server is visible at the URL http://www.mysite.com.

    Now any file you put into ~myname/httpd, say ~myname/httpd/contact_me.html, is available through the Web server -- in this case as http://www.mysite.com/contact_me.html.

    That file doesn't have to be an HTML document; it could also be a script. Save a simple CGI script in the docroot as test.pl and you can now run it by visiting http://www.mysite.com/test.pl. (Maybe; see footnote below.)

    You can append even more information to the URL, like http://www.mysite.com/test.pl/12345, and this will still run test.pl with 12345 in $ENV{PATH_INFO}.

    Is any of this really necessary for your particular application? I don't really have enough information to say. But it is an alternative to the question-mark way of passing CGI params.

    Footnote: Depending on your server configuration, you might not actually be able to execute arbitrarily-named programs from arbitrary directories. So you might actually have to do something like http://www.mysite.com/cgi-bin/myprog.cgi/more/params/go/here.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://201295]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-03-28 11:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found