bitcoinxt / website

Website sources for bitcoinxt.software
6 stars 12 forks source link

Fix broken redirection #9

Closed ghost1542 closed 9 years ago

ghost1542 commented 9 years ago

When run with serve or most servers, links to /#some-anchor get redirected to /welcome.html This commit copies welcome.html to index.html to fix that issue while preventing redirection loops for browsers which have the webpage in their cache.

Given that this issue doesn't seem to happen on the live website, I suspect that the landing page might be set to /welcome.html internally, so this might require updating server-side configuration.

Note; This pull request will conflict with several others. Since it can be easily rebased, it is probably more appropriate to merge any other PRs before that one.

mikehearn commented 9 years ago

Hm, I haven't seen any issues when testing locally or on the live site. Yeah, the index page being called welcome.html is a bit odd and you're right, the server is configured to know about that. But what does changing it accomplish?

ghost1542 commented 9 years ago

@mikehearn If that issue doesn't risk happening on the main server, the remaining benefit of this change is to allow the menu to work correctly when building and previewing the website locally. The buildin Webrick server and most other servers will use index.html as the landing page.

To reproduce the issue, you can click on "Bigger blocks" and "Take part" on this live preview http://bitcointest3.us.to/welcome . These menu entries won't bring you to the right subsections as intended. Instead, going to /#sec-hardfork triggers the redirection to /welcome.

ghost1542 commented 9 years ago

@mikehearn I have just found a way to fix that issue without having to duplicate content. Serve allows to render the content of welcome.html into index.html. The pull request has been updated.

mikehearn commented 9 years ago

Great, thanks!