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 年前檢視次數 314 次
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
專家
已回答 1 年前
  • 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.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南