<bdo id='iVD3f'></bdo><ul id='iVD3f'></ul>
    1. <small id='iVD3f'></small><noframes id='iVD3f'>

      <legend id='iVD3f'><style id='iVD3f'><dir id='iVD3f'><q id='iVD3f'></q></dir></style></legend>

      <i id='iVD3f'><tr id='iVD3f'><dt id='iVD3f'><q id='iVD3f'><span id='iVD3f'><b id='iVD3f'><form id='iVD3f'><ins id='iVD3f'></ins><ul id='iVD3f'></ul><sub id='iVD3f'></sub></form><legend id='iVD3f'></legend><bdo id='iVD3f'><pre id='iVD3f'><center id='iVD3f'></center></pre></bdo></b><th id='iVD3f'></th></span></q></dt></tr></i><div id='iVD3f'><tfoot id='iVD3f'></tfoot><dl id='iVD3f'><fieldset id='iVD3f'></fieldset></dl></div>
    2. <tfoot id='iVD3f'></tfoot>
    3. AngularJS - 启用没有 404 错误的 HTML5 模式页面刷新

      AngularJS - Enable HTML5 Mode Page Refresh Without 404 Errors(AngularJS - 启用没有 404 错误的 HTML5 模式页面刷新)
        <tbody id='yQ3ow'></tbody>

      <i id='yQ3ow'><tr id='yQ3ow'><dt id='yQ3ow'><q id='yQ3ow'><span id='yQ3ow'><b id='yQ3ow'><form id='yQ3ow'><ins id='yQ3ow'></ins><ul id='yQ3ow'></ul><sub id='yQ3ow'></sub></form><legend id='yQ3ow'></legend><bdo id='yQ3ow'><pre id='yQ3ow'><center id='yQ3ow'></center></pre></bdo></b><th id='yQ3ow'></th></span></q></dt></tr></i><div id='yQ3ow'><tfoot id='yQ3ow'></tfoot><dl id='yQ3ow'><fieldset id='yQ3ow'></fieldset></dl></div>
        • <legend id='yQ3ow'><style id='yQ3ow'><dir id='yQ3ow'><q id='yQ3ow'></q></dir></style></legend>

            <small id='yQ3ow'></small><noframes id='yQ3ow'>

          1. <tfoot id='yQ3ow'></tfoot>
              • <bdo id='yQ3ow'></bdo><ul id='yQ3ow'></ul>
                本文介绍了AngularJS - 启用没有 404 错误的 HTML5 模式页面刷新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我还尝试将 $locationProvider.html5Mode(true); 中的 ui-routing 和 base href 设置为 <base href="http://localhost/rootfoldername/"> 它会删除散列,但刷新时会出现 404 错误.

                I also tried by setting the $locationProvider.html5Mode(true); in ui-routing and base href to <base href="http://localhost/rootfoldername/"> it removes hash but on refresh it gives 404 Error.

                请帮帮我...

                推荐答案

                正如其他人所说,启用 html5 模式并添加 baseURL 可以解决问题,但是仍然缺少一个难题,那就是服务器的重写规则配置.

                As others said enabling html5 mode and adding a baseURL does the trick, however one piece of the puzzle is still missing and thats the rewrite rules configuration for your server.

                抛出 404 的原因是服务器没有将所有路由重定向到 angularJS 应用程序.这就是重写规则出现的地方.

                The reason why the 404 is thrown is because the server doesn't redirect all routes to the angularJS app. This is where rewrite rules come on.

                对于 apache:如何在 apache 中重写 urlangularjs 应用程序的 htaccess

                对于 IIS:如何配置 IIS 以在 HTML5 模式下重写 AngularJS 应用程序的 URL?

                这篇关于AngularJS - 启用没有 404 错误的 HTML5 模式页面刷新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                quot;Each child in an array should have a unique key propquot; only on first time render of page(“数组中的每个孩子都应该有一个唯一的 key prop仅在第一次呈现页面时)
                How do I make a TextGeometry multiline? How do I put it inside a square so it wraps like html text does inside a div?(如何制作 TextGeometry 多线?如何将它放在一个正方形内,以便它像 html 文本一样包裹在 div 内?) - IT屋-程序员软件开发技术分享社
                AngularJS Error: Unknown provider: aProvider lt;- a(AngularJS 错误:未知提供者:aProvider lt;- a)
                Scale background image to fit ie8 window(缩放背景图像以适合 ie8 窗口)
                Safari 5.1 breaks CSS table cell spacing(Safari 5.1 打破 CSS 表格单元格间距)
                Put in bold part of description in metatag Drupal module(将描述的粗体部分放在元标记 Drupal 模块中)
                    <tbody id='5YhhM'></tbody>
                  <i id='5YhhM'><tr id='5YhhM'><dt id='5YhhM'><q id='5YhhM'><span id='5YhhM'><b id='5YhhM'><form id='5YhhM'><ins id='5YhhM'></ins><ul id='5YhhM'></ul><sub id='5YhhM'></sub></form><legend id='5YhhM'></legend><bdo id='5YhhM'><pre id='5YhhM'><center id='5YhhM'></center></pre></bdo></b><th id='5YhhM'></th></span></q></dt></tr></i><div id='5YhhM'><tfoot id='5YhhM'></tfoot><dl id='5YhhM'><fieldset id='5YhhM'></fieldset></dl></div>

                • <tfoot id='5YhhM'></tfoot>
                  <legend id='5YhhM'><style id='5YhhM'><dir id='5YhhM'><q id='5YhhM'></q></dir></style></legend>

                    <small id='5YhhM'></small><noframes id='5YhhM'>

                      <bdo id='5YhhM'></bdo><ul id='5YhhM'></ul>