URL redirects can be used to redirect traffic from one web page to another. When you change a URL on your website, you can create a URL redirect to ensure your visitors can still find what they're looking for.
One thing to note is that all the redirection rules only apply to frontend (store front) links. You cannot redirect API or Backend URLs.
To manage your redirects, on your Nilead admin, open the Quick Menu and search for Redirect.
Note You can turn off the redirection on/off by toggling the enabled switch.
You have 2 types of redirects that you can use:
This redirection rule is really straight forward, you need to put in the "From" and "To", so for example if you want to redirect from https://yoursite.com/about-us to https://yoursite.com/about, you can put in:
From: /about-us
To: /about
Please note how we do NOT include the domain itself inside the redirection rules. This allows the redirection rules to keep working even when we change domain later.
You can also use regular expression to redirect your URLs, it requires you to first understand and know how to use PCRE regex:
Assuming you want to redirect all the links that start with /product/ to /service/, you can put in:
From: ^/product/(.*)
To: /service${1}
You can test your Regex rules at Regex101.
Internally, we use preg_match for matching and preg_replace for replacing.
Note At the moment, regex is not as performant as the normal redirects and thus not recommended for use. All regex redirections are currently turned off, if you would like to use this feature on your website please contact our support.