Is it possible to have an html link that links to

2019-08-24 07:43发布

I have some autogenerated html documentation for a python project. When autogenerating this the 'main page' is created as index.html inside /manual/_build/html/index.html. I want to have a manual.html in the root folder that links to the index.html. I can put the following in manual.html:

<a href="manual/_build/html/index.html">link</a>

which makes a clickable link to index.html. I would like to be send directly to index.html without having to click on anything. Is this possible?

Thanks, Niek

2条回答
闹够了就滚
2楼-- · 2019-08-24 07:45

Just redirect it to index.html..Write this in manual.html...

<script>
document.location = "manual/_build/html/index.html";
</script>
查看更多
3楼-- · 2019-08-24 07:46

Add the following to your HTML <head> tag:

<meta HTTP-EQUIV="REFRESH" content="0; url=index.html">
查看更多
登录 后发表回答