LoveAndHappiness
LoveAndHappiness

Reputation: 10135

Page.js: Instead of Hashbang just Hash?

Right now if page.js generates urls they look like this:

http://mysite.dev/#!/contact

Well I have the option to disable the hashbang completely and make urls look like this:

http://mysite.dev/contact

But that gives me the problem, that whenever I refresh the URL, I get a failed get request.

I would rather have just a hash, like this:

http://mysite.dev/#/contact

Is this somehow possible?

Upvotes: 0

Views: 505

Answers (1)

TbWill4321
TbWill4321

Reputation: 8676

If you'd prefer to completely remove #! and # is to set up your server to always respond to requests with your homepage, no matter the route. Then your javascript can decide whether to show a page or 404 not found.

After checking the page.js code, it seems that your only option is a hashbang.

Upvotes: 2

Related Questions