【发布时间】:2016-06-10 15:52:36
【问题描述】:
所以我试图在 Githubs gh-pages 上托管的网络应用程序上使用重定向元标记。
这是我正在使用的标签;在本地开发机器上运行良好
<meta http-equiv="refresh" content="0; url=/angular/?layout=4#/app/home" /> <!--redirect-->
问题是 gh-pages 网站存在于这样的 URL 上
https://github.com/username/reponame
这意味着我的重定向不起作用,因为它为此删除了reponame:
https://github.com/username/angular/?layout=4#/app/home
显然我可以在重定向标记中硬编码 repo 名称,但这意味着当我在本地开发时它将无法工作,因为本地开发中的 URL 不包含 repo 名称。
应该如何设置我的元标记以使其在本地和 gh 页面上工作
【问题讨论】:
标签: html redirect github github-pages