>> If a user goes to our site with a url like http://sitename/en/our-exports/exporting.aspx
>> We wish them to be redirected to a sitecore item for example http://sitename/exports
>> How is this done using the SXA redirect item please?
You can use the Redirect Map functionality. You need to create a redirect item under /sitecore/content/[Tenant]/[Site]/Settings/Redirects and specify the mapping between URLs:
Important note: the exporting item must not exist. Redirection will be performed only if Sitecore XP can't find a matching item, just before the user is redirected to a 404 page.
If you want to redirect from existing item, you can use the method described in the article you mentioned. For example, you can insert a redirect item named OldContact, which will redirect to the /Contact page:
>> Also does it support wildcards and regex? If so how is this done?
Redirect Maps support regular expressions. General rule for a regular expression in the redirect mapping: it must start with ^ and end with $. Here is a couple of examples:
You can use the Redirect Map functionality. You need to create a redirect item under /sitecore/content/[Tenant]/[Site]/Settings/Redirects and specify the mapping between URLs:
Important note: the exporting item must not exist. Redirection will be performed only if Sitecore XP can't find a matching item, just before the user is redirected to a 404 page.
If you want to redirect from existing item, you can use the method described in the article you mentioned. For example, you can insert a redirect item named OldContact, which will redirect to the /Contact page:
>> Also does it support wildcards and regex? If so how is this done?
Redirect Maps support regular expressions. General rule for a regular expression in the redirect mapping: it must start with ^ and end with $. Here is a couple of examples:
This will redirect any request to a page under /products to /anotherpage:
Tokens are regex expressions inside parentheses. There are two tokens in the input string above:
- (.*) - matches any character
- ([1-9]+) - matches any numeric sequence