Created
June 18, 2012 21:07
-
-
Save inancsevinc/2950723 to your computer and use it in GitHub Desktop.
configuration example of HttpSubModule, replaces "__name__" in the response
This file contains 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
server { | |
listen 80; | |
server_name localhost; | |
root D:/Development/public; | |
sub_filter_once off; | |
location / { | |
if ($uri ~* /(\w+)\.html$) { | |
set $filename "$1"; | |
} | |
sub_filter "__name__" $filename; | |
try_files $uri $uri/ ; | |
} | |
} |
This file contains 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
<html> | |
<head> | |
<title>__name__</title> | |
</head> | |
<body> | |
<h1>Contents of __name__:</h1> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment