xref: /lighttpd1.4/tests/var-include-sub.conf (revision 7258624e)
1# file to be included
2$HTTP["host"] == server.name {
3	url.redirect = (
4		"^/include$"       => "/good_include",
5		"^/concat$"        => "/good_" + "concat",
6		"^/servername1$"   => "/good_" + server.name,
7		"^/servername2$"   => server.name + "/good_",
8		"^/servername3$"   => "/good_" + server.name + "/",
9		"^/var.myvar$"     => "/good_var_myvar" + var.myvar,
10		"^/myvar$"         => "/good_myvar" + myvar,
11		"^/number1$"       => "/good_number" + one,
12		"^/number2$"       => one + "/good_number",
13		"^/env$"           => "/" + env.env_test,
14		"^/rewrite/all(/.*)$" => "$1",
15	)
16
17	num = 1
18	num2 = 2
19	num2 += 1
20
21	# without var prefix
22	mystr = "string"
23	mystr += "_append"
24
25	# from parent
26	one += 1
27
28	url.redirect += (
29		"^/array_append$"  => "/good_array_append",
30		"^/string_append$" => "/good_" + mystr,
31		"^/number_append$" => "/good_" + one,
32	)
33
34	cmd = "echo cmd_ok=456"
35	include_shell cmd
36	url.redirect += (
37		"^/include_shell$" => "/good_include_shell_" + cmd_ok,
38	)
39}
40