文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>[转帖]一个很有用的apache指令SetEnvIfNoCase

[转帖]一个很有用的apache指令SetEnvIfNoCase

时间:2008-04-25  来源:傲枭

说明: Sets environment variables based on attributes of the request without respect to case
语法: SetEnvIfNoCase attribute regex [!]env-variable[=value] [[!]env-variable[=value]] ...
上下文: 服务器配置, 虚拟主机, 目录, .htaccess
覆盖项: FileInfo
状态: Base
模块: mod_setenvif
兼容性: Apache 1.3 and above

The SetEnvIfNoCase is semantically identical to the SetEnvIf directive, and differs only in that the regular expression matching is performed in a case-insensitive manner. For example:
SetEnvIfNoCase Host Apache\.Org site=apache This will cause the site environment variable to be set to "apache" if the HTTP request header field Host: was included and contained Apache.Org, apache.org, or any other combination.   SetEnvIfNoCase 当满足某个条件时,为变量赋值,一般结合其他指令使用。 如: 1。SetEnvIf Request_URI "/logo(.)+" local_ref=0 Allow from env=local_ref  当local_ref有值时,可以访问。 2。SetEnvIfNoCase Request_URI .js$ useless-file
CustomLog logs/hebgc.com/access.log combined env=!useless-file
当满足条件时才记录日志。
相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载