#if, #elif, #else and #endif commandsSSI pages can also contain flow control commands. These provide the ability to perform advanced alteration of a the html page. The various flow control commands are as follows: <!--#if expr="<expression>" --> <!--#elif expr="<expression>" --> <!--#else --> <!--#endif --> When one of the expressions matches, then the html enclosed in the matching block is parsed and returned to the client. Flow control commands can be nested.
Caching of expressionsIn order to improve performance of expressions and regular expressions, Zeus Web Server caches the last 100 expressions it parsed, and the last 100 regular expressions. These values can be altered using the following tunables: tuning!ssi!expressioncachesize 100 tuning!ssi!regexcachesize 100 Apache CompatibilityThe Zeus implementation follows as closly as possible the documentation for Apache, however Apache has some bugs in its expression parsing (especially '$' expansion). By default Zeus parses the expressions without implementing the bugs. In order to switch the parser to the 'Apache bug Compatibility' mode, set the following tunable (in web/global.cfg): tuning!ssi!apachebugcompat yes ExampleAn example use of flow control commands would be to report back to the client the browser that is being used. <!--#if expr=" ! $HTTP_USER_AGENT " --> No user agent specified <!--#elif expr=" $HTTP_USER_AGENT = /MSIE/ " --> Microsoft Internet Explorer <!--#elif expr=" $HTTP_USER_AGENT = /Mozilla/ " --> Mozilla or something that identifies itself as such (almost everything) <!--#else --> Other browser type <!--#endif -->
Content Manager
[Administrator] 16 December 2005
|
Recent Articles
Other Resources
|


