【发布时间】:2015-11-10 11:36:14
【问题描述】:
我克隆了聚合物入门套件,它工作得非常好。
所以在占位符路由中有一个页面叫做 http://localhost:5000/users/Rob。 如果我通过单击 rob 链接从用户页面移动到 Rob 页面,则上述 url 有效。
但是如果我直接在浏览器上粘贴http://localhost:5000/users/Rob并回车,它就不起作用了。
我假设上述问题可以通过使用 htaccess 来解决。但不知道怎么做。
下面是我的 .htaccess 代码
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /index.html [L,R=302]
【问题讨论】:
标签: .htaccess polymer url-routing polymer-starter-kit