- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2020
05:42 PM
03-30-2020
05:42 PM
Store View URL "WWW" Redirect Issue
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.
Labels:
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2020
08:09 PM
03-30-2020
08:09 PM
Re: Store View URL "WWW" Redirect Issue
Hi @tony_le2
Check the below stack solution.
https://stackoverflow.com/a/11733363
I hope it will help you!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2020
03:40 AM
03-31-2020
03:40 AM
Re: Store View URL "WWW" Redirect Issue
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
Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer