我已经创建了一个基本的aurelia应用程序 这个回购 我试图摆脱URL栏中的#(hashtag)。
我有2个项目,一个在一台机器上运行WebApi,另一个在另一台机器上运行一个空的Web项目(不是MVC)。在 官方文件网站 它只说明了如何配置你的路线,但我的项目不是面向MVC的。
如何在访问时从Web.config配置IIS服务器 http://localhost/home
它应该启动aurelia框架而不是404未找到的页面?
我已经创建了一个基本的aurelia应用程序 这个回购 我试图摆脱URL栏中的#(hashtag)。
我有2个项目,一个在一台机器上运行WebApi,另一个在另一台机器上运行一个空的Web项目(不是MVC)。在 官方文件网站 它只说明了如何配置你的路线,但我的项目不是面向MVC的。
如何在访问时从Web.config配置IIS服务器 http://localhost/home
它应该启动aurelia框架而不是404未找到的页面?
我正在使用需要web.config来正确处理非散列路由的Azure,它只是将所有路由重定向到包含aurelia应用程序的index.html。没有它(或类似的技术)它给404s。
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<remove name="redirect all requests" />
<rule name="redirect all requests" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" pattern="" ignoreCase="false" />
</conditions>
<action type="Rewrite" url="index.html" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
希望这可以帮助。
我正在使用需要web.config来正确处理非散列路由的Azure,它只是将所有路由重定向到包含aurelia应用程序的index.html。没有它(或类似的技术)它给404s。
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<remove name="redirect all requests" />
<rule name="redirect all requests" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" pattern="" ignoreCase="false" />
</conditions>
<action type="Rewrite" url="index.html" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
希望这可以帮助。