首页 > 语言 > JavaScript > 正文

vue模式history下在iis中配置流程

2024-05-06 15:40:27
字体:
来源:转载
供稿:网友

1.npm run build生成代码加密

2.在iis添加网站定位到dist文件下

第三步第四步配置是www.baidu.com/home一直重新刷新会出现404问题

3.安装URL重写

https://www.iis.net/downloads...

4.在dist文件下配置web.config

<system.webServer>  <rewrite>   <rules>    <rule name="Handle History Mode and custom 404/500" stopProcessing="true">     <match url="(.*)" />     <conditions logicalGrouping="MatchAll">      <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />      <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />     </conditions>     <action type="Rewrite" url="/" />    </rule>   </rules>  </rewrite>

   </system.webServer>遇到一个问题:多访问几次页面或者端口应用程序池的状态会结束(事件ID5002,错误503),原因是后台占用内存太大,解决方法:要勾选预编译并发布版本。

总结

以上所述是小编给大家介绍的vue模式history下在iis中配置流程,希望对大家有所帮助,如果大家有任何疑问欢迎给我留言,小编会及时回复大家的!

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表

图片精选