1

In Sitecore 10.2 Sxa, I am trying to add redirection rules with redirect map, which is under the settings item.

enter image description here

But when I try to add a redirect map , redirection does not work. What could be the cause of this?

enter image description here

1
  • Could you please add more information? Also if possible, add the details/steps that you have followed to add redirects. Commented Sep 13, 2023 at 10:43

4 Answers 4

1

In the old to new URL names, In old URL (on left), Can you try to enter the page name which does not exist in your content tree ? Just to test it our "testingredirect123" (just making it up so that it does not resolve the item on your content tree because it does not exist)

And then see if it redirect to the new URL when you hit this page?

If it works, just make sure that the old URL which you are giving should not exist and hence it should not resolve for redirect module to work.

Let me know

0

It looks like you are using the third party module from sitecorescientist.com: https://sitecorescientist.com/2018/10/17/redirect-module-for-sitecore-9/

In your screen shot it looks like you have not selected the type of redirect that you want to use. Try changing that to '301 Redirect', republish and test again.

Also, please check that you have completed the setup actions from the github page (for example adding redirectSettingsId to 'website' node in sites config)

If that doesnt work, have you checked that the version of sitecore you are using is compatible with the module? The web page promoting the module suggests its good to use on Sitecore version 9.

If you are using a later version, then you will need to clone a copy of the repository (https://github.com/velan99/SitecoreRedirect) and update the solution to use .Net Framework 4.8 and also the latest sitecore nuget packages.

If you have done all the above, then please double check the sitecore logs to see if there are any clues there.

I just tested the module on using values similar in format to what you have used and it worked as expected.

0

Please ensure two things when applying a redirect using a redirect map:

  1. Always specify the type of redirect you intend to use.
  2. Make sure that your old URL or item (in your case, '/NewItem Tests And NewsTestRedirect') does not exist in the content tree. The redirect map only functions when an item results in a 404 error.
0

From the drop-down list, select the type of redirect:

Permanent Redirect (HTTP 301) – redirects target resource to a permanently different URL.

Temporary Redirect (HTTP 302) - redirects target resource to a temporarily different URL.

Server Transfer – helps reduce server requests, keeps the URL the same and is not visible to the client. For example, when you want to transfer the current page request to another .aspx page on the same server or when you want to avoid unnecessary roundtrips to the server.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.