Can I use mod_include.c to process .shtm, .shtml and .stm files?
May 7, 2004 12:42 PM Subscribe
Question about Server Side Includes under IIS [more inside].
I've got a bunch of files that include Server Side Include directives supported by Apache. Unfortunately, many of them, such as #set and if-then-else logic are not supported by Microsoft's IIS, which I am now running. My question is, is it possible to take Apache's mod_include.c, compile it into a .dll, and use that to process .shtm, .shtml, and .stm files instead of ssinc.dll? Is this a really, really, really bad idea? Has someone figured out a way around this that will work using a similar approach?
There is a page on Apache's website that describes the process of compiling a module into a .dll, but I'm a bit confused on what needs to be done as I typically don't do much besides Perl/SQL.
I've got a bunch of files that include Server Side Include directives supported by Apache. Unfortunately, many of them, such as #set and if-then-else logic are not supported by Microsoft's IIS, which I am now running. My question is, is it possible to take Apache's mod_include.c, compile it into a .dll, and use that to process .shtm, .shtml, and .stm files instead of ssinc.dll? Is this a really, really, really bad idea? Has someone figured out a way around this that will work using a similar approach?
There is a page on Apache's website that describes the process of compiling a module into a .dll, but I'm a bit confused on what needs to be done as I typically don't do much besides Perl/SQL.
I assume IIS does proxying certain requests? You could run apache accessible only locally, and have IIS proxy requests for .shtml files to that. It all depends on your reasons for wanting to run IIS though. (Massochism comes to mind)
posted by fvw at 3:03 PM on May 7, 2004
posted by fvw at 3:03 PM on May 7, 2004
I assume IIS does proxying certain requests?
Not natively, as far as I can tell, but you could do it pretty easily with a custom 404 error page. I.e., if a page isn't found, the 404 page requests it from Apache. Of course that'll require creating a COM object to make the HTTP request, so it'll have a lot of overhead compared to doing it the other way around (i.e. have Apache proxy to IIS).
posted by kindall at 3:36 PM on May 7, 2004
Not natively, as far as I can tell, but you could do it pretty easily with a custom 404 error page. I.e., if a page isn't found, the 404 page requests it from Apache. Of course that'll require creating a COM object to make the HTTP request, so it'll have a lot of overhead compared to doing it the other way around (i.e. have Apache proxy to IIS).
posted by kindall at 3:36 PM on May 7, 2004
it would probably be easier to simply edit the files to use the ASP syntax
Maybe. ASP doesn't allow for conditional includes though. IIRC, all of the includes are read in before any logic is processed, so the rewriting might become a larger job than it seems.
posted by yerfatma at 6:33 AM on May 8, 2004
Maybe. ASP doesn't allow for conditional includes though. IIRC, all of the includes are read in before any logic is processed, so the rewriting might become a larger job than it seems.
posted by yerfatma at 6:33 AM on May 8, 2004
ASP doesn't allow for conditional includes though.
Sure it does. <% If (condition) Then Server.Execute("path_to_file") %>
posted by kindall at 1:32 PM on May 8, 2004
Sure it does. <% If (condition) Then Server.Execute("path_to_file") %>
posted by kindall at 1:32 PM on May 8, 2004
This thread is closed to new comments.
If you're set on using IIS, it would probably be easier to simply edit the files to use the ASP syntax, and then configure IIS to use the ASP filter to process .shtml etc. files.
posted by kindall at 1:40 PM on May 7, 2004