下面这段nginx伪静态如何转换成IIS的伪静态?

JzKx 2021-01-18 06:24:44
location /wap/ {
       try_files $uri /wap/index.html;
}
location / {
    if (!-e $request_filename){
        rewrite  ^(.*)$  /index.php?s=$1  last;   break;
    }
}

这样写不管用(核心用的TP5)

<rules>
<rule name="web_wap" stopProcessing="true">
<match url="^wap/(.*)$" ignoreCase="false" />
<action type="Rewrite" url="/wap/index.html" appendQueryString="true" />
</rule>
<rule name="web" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/{R:1}" appendQueryString="true" />
</rule>
</rules>
...全文
1455 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

8,327

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 IIS
社区管理员
  • IIS
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧