301 redirect for site hosted at github?

前端 未结 7 1220
没有蜡笔的小新
没有蜡笔的小新 2020-12-12 23:34

Here\'s a Github repository of mine: https://github.com/n1k0/casperjs

There\'s a gh-pages branch to hold the project documentation, which is basically t

相关标签:
7条回答
  • 2020-12-13 00:28

    You can redirect using Javascript after host detection, like this:

    if (window.location.href.indexOf('http://niko.github.com') === 0) {
        window.location.href = 'http://casperjs.org{{ page.url }}';
    }
    

    But I agree, it's not an HTTP redirection.

    0 讨论(0)
提交回复
热议问题