2
votes

I cloned polymer starter kit and its working perfectly fine.

So in the placeholder route there is a page called http://localhost:5000/users/Rob. The above url works if I move from users page to Rob page by clicking on the rob link.

but if I directly paste on http://localhost:5000/users/Rob on browser and press enter, it does not work.

I assume the above might be resolved by using htaccess. but couldn't figure out how.

Below is my .htaccess code

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /index.html [L,R=302]
2

2 Answers

0
votes

Removing [L,R=302] did the trick for me!

.htaccess:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /

index.html:

<app-route
route="{{route}}"
pattern="/users/:id"
data="{{usersRouteData}}"
tail="{{usersSubroute}}"
active="{{usersActive}}"
></app-route>