iis 7 - How to config Vue 2 application on IIS server? -
i need config iis server , vue 2 application, installed vue 2 application
production build on windows iis 7 server
, , work fine, 1 thing not working: when try open page link "example mysite.com/somepage
" written in vue-router see 404 error
, if click on menu link work fine, if type main url mysite.com open, routes not working!
i think need setting httpredirect or this!
from information i'm assuming you're using history
mode, here's 1 i've been using, , can reference on here:
<?xml version="1.0" encoding="utf-8"?> <configuration> <system.webserver> <rewrite> <rules> <rule name="handle history mode , 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="index.html" /> </rule> </rules> </rewrite> <httperrors> <remove statuscode="404" substatuscode="-1" /> <remove statuscode="500" substatuscode="-1" /> <error statuscode="404" path="/survey/notfound" responsemode="executeurl" /> <error statuscode="500" path="/survey/error" responsemode="executeurl" /> </httperrors> <modules runallmanagedmodulesforallrequests="true"/> </system.webserver> </configuration>
Comments
Post a Comment