【发布时间】:2019-09-16 06:28:56
【问题描述】:
我正在使用 azure devops 步骤尝试使用管理 IIS 任务在 IIS 中创建 https 重定向规则。
我正在使用以下“其他 appcmd.exe 命令”
set config -section:system.webServer/rewrite/rules /+"[name='http_redirect',enabled='True']" /commit:apphost
set config -section:system.webServer/rewrite/rules.[name='http_redirect'] /match.url:"(.*)" /match.ignoreCase:true /commit:apphost
set config -section:system.webServer/rewrite/rules.[name='http_redirect'].conditions/add /+"[input='{HTTPS}',pattern='off']" /commit:apphost
set config -section:system.webServer/rewrite/rules.[name='http_redirect'].action /+"[type='Redirect',url='https://{HOST_NAME}/{R:1}',redirectType='Found']" /commit:apphost
似乎第一个命令在创建空白规则时运行,但第二个命令尝试通过名称 http_redirect
查找规则失败【问题讨论】:
标签: iis https azure-devops