redirection issue in elastic load balancer using ecs while redirecting xyz.com to www.xyz.com

0

we are achieving this https://xyz.com/path/ gets redirected to https://www.xyz.com/path/

so now ill explain the main issue im having https://xyz.com gets redirected to https://www.xyz.com but we want this to redirect there https://www.xyz.com/ this append slash need to add in main

and my rule is this for ELB

HTTP Host Header is xyz.com Redirect to HTTPS://www.xyz.com:443/#{path}?#{query}/ Status code: HTTP_301

in addition issue

while im using curl -I command on my site curl -I https://xyz.com/

its location shows Location - https:/www.xyz.com:443/ does this 443 should be there??

and when using with http

curl -I http://xyz.com/

its redirecting to https://xyz.com/ shouldnt this redirect to https://www.xyz.com/

已提问 6 个月前805 查看次数
1 回答
2
已接受的回答

This seems normal behaviour. You dont usually have a slash at the end of a domain name. Even in Chrome when you put a slash on the end it gets removed

As standard the Base URL of a Domain name does not end in a /.

Only when you have a Path does it end in a slash..

profile picture
专家
已回答 6 个月前
profile picture
专家
已审核 5 个月前
profile picture
专家
已审核 6 个月前
profile picture
专家
已审核 6 个月前
  • so you are saying we can't achieve that?

  • (Firefox, Chrome, Opera) have since changed to omit the / when accessing the root of a domain

  • You may find its working fine but the browser is stripping it

  • thank you for explaining

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则