【发布时间】:2016-06-29 22:57:54
【问题描述】:
我有一个 Polymer 站点,我需要为其编写重写规则。
目前有example.com/index.html#contact、example.com/index.html#FAQ等。它在浏览器中默认为example.com/#contact, example.com/#FAQ, ...
我希望它可以作为example.com/contact、example.com/FAQ、...访问它
我有:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.html#$1 [NE]
但是,当我将 R 标志添加到最后一行时,它“有效”。不幸的是,使用R 标志,地址在浏览器中变为example.com/index.html#home,我不希望这样。
有什么建议吗?
【问题讨论】:
标签: apache mod-rewrite polymer hashtag