301RedirectModule
301RedirectModule copied to clipboard
I can't make it work with existing pages redirecting to another page
Hello, i'm trying to redirect an existing page (Url Redirect item) to another existent page and it doesn't work at all.
The configuration is:
Requested Url: /Careers
Response Status Code: 301
Redirect To Item: /MyNewCareers
The /Careers item exists
The /MyNewCareers item exists
if i go to my site root /Careers it goes to /Careers and no to /MyNewCareers
if i change the Requested Url setting to /testing (item doesn't exists), then if i go to my site root /testing, the redirect works and it goes to /MyNewCareers
Why this is happening? do i miss something?
Is the redirect module installed in your pipeline before the Item resolver? This behavior could be explained by it being in the other order, because non-found items wouldn't be resolved and thus passed through to the redirect module.
How can i see if this is how you say?
That's what pipeline says about the redirect module (i think)
<httpRequestBegin>
<processor type="SharedSource.RedirectModule.Processors.RedirectProcessor,SharedSource.RedirectModule" patch:after="processor[@type='Sitecore.Pipelines.HttpRequest.ItemResolver, Sitecore.Kernel']"/>
</httpRequestBegin>
I have changed the patch:after for patch:before and now it works! that was the problem? why the module is installed with a configuration that doesn't work? or i'm wrong?
I wonder if the default changed in Sitecore 8! Glad this solved your problem! If you get the time and have a chance, a pull request would be very welcome!
I have changed the
patch:afterforpatch:beforeand now it works! that was the problem? why the module is installed with a configuration that doesn't work? or i'm wrong?
I also faced the same scenario and this setting also works for me, I just want to confirm if we change this setting to prod it doesn't impact the current redirects or anywhere else