[英]Visual Studio asp.net mvc project starter page shows complete url
I have started a new angularjs SPA with Microsoft ASP.net WEBAPI. 我已经使用Microsoft ASP.net WEBAPI启动了一个新的angularjs SPA。 My SPA app folder resides on the server parallel to APIs folder.
我的SPA应用程序文件夹位于与API文件夹平行的服务器上。 Hence my index file is in app folder.
因此,我的索引文件位于app文件夹中。 I right clicked on the index.html file and set it as Starter Page.
我右键单击index.html文件,并将其设置为Starter Page。 The problem is when I run the app it shows all complete URL.
问题是,当我运行该应用程序时,它会显示所有完整的URL。 like this
像这样
http://localhost:1540/Public/app/index.html
How do I hide it and only show 如何隐藏它,只显示
http://localhost:1540/
while running my index page as a starter page. 同时将我的索引页面作为初始页面运行。 It will be a problem when I deploy.
部署时会出现问题。
You have a few options. 您有几种选择。 URL Rewriting , manipulating the MVC Routing system to serve your file or as stated here return the file through MVC ie your
HomeController
's Index
Action. URL重写 , 操纵MVC路由系统以服务您的文件,或者如此处所述,通过MVC(即
HomeController
的Index
Action)返回文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.