httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph A Nagy Jr <joseph_a_nagy...@charter.net>
Subject Re: [users@httpd] file::// question
Date Thu, 29 May 2003 23:05:38 GMT
David Wilson wrote:
> I am working with Apache and IE6 on WinXP. 
> 
> I have an HTML file with an embedded form that invokes a CGI script.
> If I access this file via the browser address
> 
> http://localhost/file.htm

Check to see you have Perl installed and properly associated with .cgi 
and .pl files.

> 
> submitting the form properly invokes the CGI script and displays the
> result in the browser window.
> 
> If instead, I use the folder window to navigate to file.htm, and click
> the file.htm icon, the browser pops up with the address
> 
> c:\Program Files\Apache Group\Apache2\htdocs\file.htm >
> the page displays properly, but submitting the form causes the browser
> window to go blank.  The address window does not change, and the
> CGI script never gets invoked.
> 
> I understand that the above address gets translated to
> 
> file:///C:/Program%20Files/Apache%20Group/Apache2/htdocs/file.htm
> 
> and accessed via the FILE protocol, not the HTTP protocol, and thereby
> bypasses Apache.  Is it possible/desirable to configure things so that
> files in the htdocs directory get invoked with the http://localhost/ prefix?
> This is just a curiosity and convenience issue for me.
> 
> I don't know if this is an Apache issue per se, since I imagine the
> changes would be made to the FILE protocol config, not the Apache
> server, but it seems closely related so I'm taking a chance.

It has nothing to do with Apache. CGI and PL files need to talk to the 
web server. When you browse just by typing in file:://C:/blah blah/ you 
are just accessing the local files as just that, files. They aren't 
anything special to the OS. That's also why .shtml files won't display 
any output from SSI when you just browse them as local files (via a file 
manager such as Windows Explorer (which is IE and IE is Windows 
Explorer, it just changes what .dll's are used when a specific protocol 
(such as FILE or HTTP) is called up), Konqueror (for KDE folks), 
Nautilus (I think for Gnome folks) and whatever Mac Heads use). IF you 
can find the config file for how Windows Explorer handles file types and 
feel comfortable editing it, I'd say go right ahead and do so. Otherwise 
if you need to test your files as they would act on a live website, 
sticking with http://localhost/fileblah.blah is your best (and really 
only) bet.

HTH


-- 
Wielder of the mighty +1 LARTsaber of Unsubscribe,
the +3 Clue-by-Four of No Attachments to a Mailing List,
and the -4 Shield of No Spell Checker


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message