作者:明睿崇 | 来源:互联网 | 2023-05-18 14:05
IhavecreatedaGithubPagessiteandputitonrepositoryabcofgithubaccountwithusernamexyz.
I have created a Github Pages site and put it on repository abc of github account with username xyz. So, my site is now live on xyz.github.io/abc I created a cname file with my custom domain, and configured my DNS with the settings said on Github pages. Now, my site is also live on mycustomdomain.com Now, I don't want my site to be live on xyz.github.io/abc . I want it to redirect to mycustomdomain.com or not accessible. Is there any way to do that? I know that I can create User Pages site (with username.github.io) which will automatically redirect to custom domain, but I want to create project site. Any suggestions?
我创建了一个Github Pages站点,并将其放在github帐户的存储库abc上,用户名为xyz。所以,我的网站现在在xyz.github.io/abc上。我使用自定义域创建了一个cname文件,并使用Github页面上的设置配置了我的DNS。现在,我的网站也在mycustomdomain.com上发布。现在,我不希望我的网站在xyz.github.io/abc上发布。我希望它重定向到mycustomdomain.com或无法访问。有没有办法做到这一点?我知道我可以创建用户页面站点(使用username.github.io),该站点将自动重定向到自定义域,但我想创建项目站点。有什么建议?
2 个解决方案