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/

asked 5 months ago789 views
1 Answer
2
Accepted Answer

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
EXPERT
answered 5 months ago
profile picture
EXPERT
reviewed 4 months ago
profile picture
EXPERT
reviewed 5 months ago
profile picture
EXPERT
reviewed 5 months ago
  • 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

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions