|
Home > Archive > Web Servers on Windows > October 2004 > Apache: Can .EXE extension be appended to CGI-BIN URLs?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Apache: Can .EXE extension be appended to CGI-BIN URLs?
|
|
|
| I'm porting an app for use with Apache (testing 2.0.50 on Win 2000)
after successful implementation using the Xitami web server. The app
uses Delphi-created .exe scripts (console application mode).
Xitami allows me to leave off the .exe extension in the URLs. For
instance, if the file MyApp.exe is located at
\apache\cgi-bin\MyApp.exe, then the url...
http//www.mydomain.com/cgi-bin/MyApp
....causes the script to be executed. I kind of like the user not
seeing the .exe, so I wrote the app to omit it.
Now, Apache seems to want the .exe, as it returns a "file not found"
when it's missing.
My research of usenet brought up several instances of developers
trying to get Apache to *stop* appending .exe to their PERL file
names, but most of these posts where from '98, and I wasn't able to
glean much from the advice offered, so I'm not sure if that was just
an old Apache bug in the Windows version.
Anyone know if/how I can change the .conf file to achieve this?
Thanks in advance,
Mark
| |
| Jim Patterson 2004-08-19, 8:46 pm |
| durb wrote:
> I'm porting an app for use with Apache (testing 2.0.50 on Win 2000)
> after successful implementation using the Xitami web server. The app
> uses Delphi-created .exe scripts (console application mode).
>
> Xitami allows me to leave off the .exe extension in the URLs. For
> instance, if the file MyApp.exe is located at
> \apache\cgi-bin\MyApp.exe, then the url...
>
> http//www.mydomain.com/cgi-bin/MyApp
>
> ...causes the script to be executed. I kind of like the user not
> seeing the .exe, so I wrote the app to omit it.
>
> Now, Apache seems to want the .exe, as it returns a "file not found"
> when it's missing.
>
> My research of usenet brought up several instances of developers
> trying to get Apache to *stop* appending .exe to their PERL file
> names, but most of these posts where from '98, and I wasn't able to
> glean much from the advice offered, so I'm not sure if that was just
> an old Apache bug in the Windows version.
>
> Anyone know if/how I can change the .conf file to achieve this?
If you only need to do this for a fixed number of CGI's, then you can
just use an aliase for each one e.g.
Alias /cgi-bin/MyApp /cgi-bin/MyApp.exe
Something more general is tricker, as without using the extension there
is no syntactic way to tell that it's a CGI program. If your CGI
programs are always in their own directory (like /cgi-bin) , you could
use AliasMatch to add a .exe extension to anything in that directory
that doesn't have one. E.g.
AliasMatch /([^./]*)$ /$1.exe
(I haven't tried this, but I see no reason that it won't work).
--
Jim Patterson
Ottawa, CANADA
| |
| DvDmanDT 2004-10-08, 5:48 pm |
| There is a command that allows you do skip the extensions for all files, and
that *might* work in your case as well.. I have not really understood what
causes this behaviour yet, but it could possibly be Options MultiViews since
I haven't really understood the meaning of it.. Could also be like mod_mime
or mod_mime_magic.. Could be something completely different as well.. But
yea, check it out..
--
// DvDmanDT
MSN: dvdmandt€hotmail.com
Mail: dvdmandt€telia.com
"durb" <durbjunk@aol.com> skrev i meddelandet
news:4659a9a.0408191128.7b49b693@posting.google.com...
> I'm porting an app for use with Apache (testing 2.0.50 on Win 2000)
> after successful implementation using the Xitami web server. The app
> uses Delphi-created .exe scripts (console application mode).
>
> Xitami allows me to leave off the .exe extension in the URLs. For
> instance, if the file MyApp.exe is located at
> \apache\cgi-bin\MyApp.exe, then the url...
>
> http//www.mydomain.com/cgi-bin/MyApp
>
> ...causes the script to be executed. I kind of like the user not
> seeing the .exe, so I wrote the app to omit it.
>
> Now, Apache seems to want the .exe, as it returns a "file not found"
> when it's missing.
>
> My research of usenet brought up several instances of developers
> trying to get Apache to *stop* appending .exe to their PERL file
> names, but most of these posts where from '98, and I wasn't able to
> glean much from the advice offered, so I'm not sure if that was just
> an old Apache bug in the Windows version.
>
> Anyone know if/how I can change the .conf file to achieve this?
>
> Thanks in advance,
>
> Mark
|
|
|
|
|