【问题标题】:Rewrite rule IIS 8, removing .html extension重写规则 IIS 8,删除 .html 扩展名
【发布时间】:2017-09-09 16:29:48
【问题描述】:

我需要将 .html 文件添加到在 IIS 上运行的 Wordpress 安装中。 我现在拥有的是:

//mydomain.com/userpage.html

我想要实现的是: //mydomain.com/userpage/

我修复了所有其他规则(漂亮的网址等...),但我应该使用哪个代码来实现上述结果?

谢谢!

最大

【问题讨论】:

    标签: wordpress windows iis url-rewriting server


    【解决方案1】:

    你的规则应该是这样的:

    <rule name="hide userpage.html">
        <match url="^userpage/?$" />
        <action type="Rewrite" url="/userpage.html" />
    </rule> 
    

    【讨论】:

      猜你喜欢
      • 2012-03-18
      • 1970-01-01
      • 2022-03-04
      • 2017-01-07
      • 1970-01-01
      • 2011-08-10
      • 2011-08-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多