1.npm run build生成代碼加密
2.在iis添加網(wǎng)站定位到dist文件下
第三步第四步配置是www.baidu.com/home一直重新刷新會(huì)出現(xiàn)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>遇到一個(gè)問題:多訪問幾次頁(yè)面或者端口應(yīng)用程序池的狀態(tài)會(huì)結(jié)束(事件ID5002,錯(cuò)誤503),原因是后臺(tái)占用內(nèi)存太大,解決方法:要勾選預(yù)編譯并發(fā)布版本。
總結(jié)
以上所述是小編給大家介紹的vue模式history下在iis中配置流程,希望對(duì)大家有所幫助,如果大家有任何疑問歡迎給我留言,小編會(huì)及時(shí)回復(fù)大家的!
新聞熱點(diǎn)
疑難解答
圖片精選