Last active
September 24, 2015 18:01
-
-
Save benjaminblack/88a56be28e2ab87d1442 to your computer and use it in GitHub Desktop.
Apache SSI (Server Side Includes) matching variables with regular expressions using the 'v' function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--#if expr="v('REQUEST_URI') =~ m#^/contact#" --> | |
<!--#set var="pathclass" value="contact" --> | |
<!--#elif expr="v('REQUEST_URI') =~ m#^/work#" --> | |
<!--#set var="pathclass" value="work" --> | |
<!--#elif expr="v('REQUEST_URI') =~ m#^/$#" --> | |
<!--#set var="pathclass" value="about" --> | |
<!--#endif --> | |
<html lang="en-US" class="<!--#echo var="pathclass" -->"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment