Hi guys,
I have 2 stores which are abc.com.au (main) and abc.co.nz (second store view)
Here are the Nginx conf and index.php
In the Magento backend, I set the Base Url: http:///www.abc.co.nz and Secure Base URL: https://www.abc.co.nz
The issue is that if I try to access with abc.co.nz, expected result will be redirect to www.abc.co.nz but instead it only sit at abc.co.nz and some styles will break due to CORB
And if I type www.abc.co.nz it will redirect to abc.com.au?
Can anyone help me please.
Hi @tony_le2
Check the below stack solution.
https://stackoverflow.com/a/11733363
I hope it will help you!
Hello @tony_le2
inside server please add below thing
server {
listen 80;
if ($host !~ ^www\.) {
rewrite ^ https://www.$host$request_uri permanent;
}
// then your code
}
if works then mark as solution