This is a discussion on Apache: Can .EXE extension be appended to CGI-BIN URLs? within the Windows Web Servers forums, part of the Web Server and Related Forums category; I'm porting an app for use with Apache (testing 2.0.50 on Win 2000) after successful implementation using ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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.co m... > 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 |