1 Answer
- Newest
- Most votes
- Most comments
1
Create a rule condition in your ALB listener:
If HTTP Host Header is xyz.com -> Redirect to HTTPS://www.xyz.com:443/#{path}?#{query}
answered 20 days ago
Relevant content
- Accepted Answerasked 2 months ago
- Accepted Answerasked 4 years ago
- Accepted Answerasked 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
isn't iam using same rule right now but the thing is i want SLASH after redirection too like www.xyz.com/ but its only showing www.xyz.com
@nishan440, I'm not sure I understand what you are trying to accomplish. The rule I provided redirect based on Host header value, so it will match all requests made to xyz.com regardless of the request URI path. So no matter if the client request was for the root path (/) or any path/subpath within it, it will redirect the request to www.xyz.com and maintain the path exactly like it was in the original client request. e.g.,: https://xyz.com/ -> https://www.xyz.com/ https://xyz.com/some_path/another_path/somefile.html?some_query -> https://www.xyz.com/some_path/another_path/somefile.html?some_query
thank you for your response ill try to explain again im avhieving for /path and /subpath but i just want it should end with a SLASH if im making sense this is my only requirement im getting this https://www.xyz.com/path but instead of this i want https://www.xyx.com/path/ THIS SLASH i want at the END of path
I'm still not sure I understand you. With the example I provided the following happens: https://xyz.com/path gets redirected to https://www.xyz.com/path https://xyz.com/path/ gets redirected to https://www.xyz.com/path/ Is this not what you want?