开发者

Setting and environment variable for one specific subdomain matching the ServerAlias

开发者 https://www.devze.com 2023-01-31 03:28 出处:网络
I have a virtual host that includes the following settings Ser开发者_StackOverflow社区verName www.host.com

I have a virtual host that includes the following settings

Ser开发者_StackOverflow社区verName www.host.com
ServerAlias *.host.com

Can I set

SetEnv FOO "bar"

for just a specific subdomain (like foo.host.com)?


The answer is the SetEnvIf directive:

SetEnvIf Host .*foo\.host\.com FOO=bar
0

精彩评论

暂无评论...
验证码 换一张
取 消