I have a Polymer site for which I need to write a rewrite rule.
Currently there is example.com/index.html#contact
, example.com/index.html#FAQ
and so on. It works by default in the browser as example.com/#contact
, example.com/#FAQ
, ...
I want it to be accessible as example.com/contact
, example.com/FAQ
, ...
I have:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.html#$1 [NE]
However, when I add the R
flag to the last line it "works". Unfortunately, with the R
flag the address becomes visible in the browser as example.com/index.html#home
and I don't want that.
Any suggestions?