How can I redirect a request to a subdomain to another subdomain on Route 53?

橙三吉。 提交于 2019-12-08 12:09:08

问题


I have a GitHub Pages Jekyll blog at blog.Antrikshy.com. I have been meaning to move it to code.Antrikshy.com for a while now. I made the new address a CNAME for antrikshy.github.io on Amazon and wired everything correctly to make it work. Now my blog.Antrikshy.com URL is broken. How can I set it to redirect it to the new subdomain?

I'm new to this. Comment if you want any more information.

Preferably I'd like to do a 301 redirect and also retain the entire path, but that's not very important. I just want it to work, even if it means that users are redirected to the new home page.


回答1:


You could accomplish this with s3 website redirect[1].

  • create a new s3 bucket with the name blog.antrikshy.com
  • enable s3 website
  • create an alias to blog.antrikshy.com bucket
  • enable redirects on your website
  • you can create redirects per page as well by creating a key for each page or redirect everything to your homepage

http://aws.amazon.com/about-aws/whats-new/2012/10/04/web-page-redirects-on-amazon-s3-hosted-websites/



来源:https://stackoverflow.com/questions/28388335/how-can-i-redirect-a-request-to-a-subdomain-to-another-subdomain-on-route-53

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!