Client-side Javascript app - url routing with no hash tag

后端 未结 4 1726
长情又很酷
长情又很酷 2020-12-02 13:34

I\'m working on a new client-side only app with the latest version of Ember.js. There is a single PHP page which builds the scripts, css, template files, etc. and delivers i

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-02 14:07

    Better than a RewriteRule, you can use this for Apache 2.2.16+:

    FallbackResource /index.html
    

    in your Apache configuration so that the RewriteRule doesn't need to run for every request. This will make sure every route in your ember application falls onto the index.html file.

提交回复
热议问题