Domain redirection to external website provider (Squarespace) and also AWS EC2 instance based on url

0

We have two applications in single AWS EC2 instance. And our primary domain is lets say https://www.ourwebsite.com is pointed to this AWS EC2 instance. 1. Website with url - https://www.ourwebsite.com 2. Admin Application url - https://www.ourwebsite.com/adminapp

Now we have website designed in squarespace with url - https://ourwebsite.squarespace.com/ We want to go live this squarespace website. For this we need to redirect the user to this squarespace site. I mean, 1. When user tries url https://www.ourwebsite.com then it should be served from squarespace. 2. When user tries to access our admin application using url https://www.ourwebsite.com/adminapp , it should go to our existing AWS EC2 instance.

Appreciate your guidance to achieve my above goal. Thanks

1개 답변
0
수락된 답변

2 Options

  1. If you are using an ALB then create redirect rules that redirects anything to your website to the new website
  2. On your webserver, create a redirect which you will need to keep your EC2's up and running for some time.
profile picture
전문가
답변함 일 년 전
  • Okay. Thanks. Can you also help how to achieve the below use case?

    When user tries to access our admin application using url https://www.ourwebsite.com/adminapp then it should be served from our existing EC2 instance where we have hosted our adminapp in IIS.

    Thanks in advance.

  • Thats fine, if using an ALB have a rule in position 1 that directs anything to /adminapp to the EC2 (Target Group) Rule 2 will redirect the domain to the external web provicer

    Are you using an ALB?

  • No. We have Route53 to manage domain.

  • You have no alb and allow direct access to the ec2? Ok then you will need to setup redirect in iis This may help https://www.pluralsight.com/blog/tutorials/iis7-redirect-windows-server-2008

    You may wish to consider moving to an alb for the extra functionality and the ability to add waf etc

  • Okay, Thanks for your guidance.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠