React使用browserHistory IIS的配置

1.打开IIS,看下有没有Web平台安装程序

2.这里默认是有的,然后打开它,搜索url,安装Url重写工具2.0


3.打开URL重写,添加规则,然后应用


ok,配置完毕

最后的配置效果为:web.config

<rewrite>
            <rules>
                <rule name="lynnbrowserHistory" patternSyntax="ECMAScript" stopProcessing="true">
                    <match url=".*" />
                    <conditions>
<add input="{HTTP_METHOD}" pattern="^GET$" />
<add input="{HTTP_ACCEPT}" pattern="^text/html" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="/index.html" />
                </rule>
            </rules>
        </rewrite>


扫描二维码关注公众号,回复: 2054340 查看本文章

猜你喜欢

转载自blog.csdn.net/bingtome/article/details/79135070