carpediem79
Technical User
I'm working on a site that uses Server Side Includes heavily for navigation. The pages are currently hosted on a Linux/Apache server. The challenge is that they need to be moved to a Windows/IIS server. There are a few thousand files. I'm running into two challenges:
1. Currently the files all use a .html or .htm extension. The only way I can get the includes to show up on the Windows server is to use a .shtml extension. That would be a lot of files to rename and links to update!
2. Some of the code in the included files does not process properly. Expressions are used to deliver the proper navigation by analyzing what directory the file is in by way of looking at the web address. Sample code follows. Unfortunately none of this code works. I am able to rewrite it in ASP and ColdFusion, but that would again require renaming every file on the site and updating all the links.
<!--#if expr="${DOCUMENT_URI}=/\/aboutus\//"-->
Show aboutus navigation on
<!--#else -->
Show aboutus navigation off
<!--#endif -->
<!--#if expr="${DOCUMENT_URI}=/\/news-events\//"-->
Show news & events on
<!--#else -->
Show news & events off
<!--#endif -->
1. Currently the files all use a .html or .htm extension. The only way I can get the includes to show up on the Windows server is to use a .shtml extension. That would be a lot of files to rename and links to update!
2. Some of the code in the included files does not process properly. Expressions are used to deliver the proper navigation by analyzing what directory the file is in by way of looking at the web address. Sample code follows. Unfortunately none of this code works. I am able to rewrite it in ASP and ColdFusion, but that would again require renaming every file on the site and updating all the links.
<!--#if expr="${DOCUMENT_URI}=/\/aboutus\//"-->
Show aboutus navigation on
<!--#else -->
Show aboutus navigation off
<!--#endif -->
<!--#if expr="${DOCUMENT_URI}=/\/news-events\//"-->
Show news & events on
<!--#else -->
Show news & events off
<!--#endif -->