有人能告诉我为什么我的霸王龙不在这里工作吗?
<rule name="Redirect to http" stopProcessing="true">
<match url="^(?i)\Q/\Ehome\Q/\E?private$" ignoreCase="true" />
<action type="Redirect" url="http://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" appendQueryString="false" />
</rule>当我添加这个脚本时,我会得到一个HTTP 500.22错误;
表达式^(?i)\q/\Ehome\q/\E私有$的语法无效。
发布于 2016-09-30 14:08:05
您不需要\Q/\E运算符,因为斜杠不是一个特殊的regex。
您还不需要使用(?i),因为您使用ignoreCase=true。
使用^/home/private$。
https://stackoverflow.com/questions/39792709
复制相似问题