abp.io和vue项目部署在iis同一站点,spa


1、HttpApiHostModule.cs中修改:

app.UseDefaultFiles();

2、发布后端代码到iis中,并安装urlrewrite(网上有教程)

3、修改web.config


    
        "Vue-Html5-Routes" stopProcessing="true">
            ".*" />
            "MatchAll">
                
                "{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                "{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                "{REQUEST_FILENAME}" pattern=".*\.[\d\w]+$" negate="true" />
                
                "{REQUEST_URI}" pattern="api/*" negate="true" />
                
                "{REQUEST_URI}" pattern="swagger/*" negate="true" />
            
            
            "Rewrite" url="/" />
        
    

4、发布vue,npm run build,将dist中的文件拷贝到后台的wwwroot目录

 5、访问前端路由即可

 想要访问swagger,直接http://项目地址/swagger

iis目录结构