问题
I have installed Redirect module in sitecore. Inside modules I have created "Redirect Url". In Redirect Url I wrote Requested Url "http://domainname/pagename" and selected Redirect To from content. But it is not working. Can anyone tell me what is wrong I am doing?
I have created redirect pattern.
回答1:
It all depends on which module implementation you are using. I have heard multiple complaints on functional of original one (seems it is discontinued at all), so people are doing their own forks. The best implementation for the day is by Chris Adams and Max Slabyak, the module with sources, packages as well as good documentation is available at GitHub and it is being maintained with time.
With that Redirect Module installed, I do the following:
- Under
/sitecore/system/Modules/Redirect Module
folder in Sitecore create a new redirect pattern calledPagename Test
- Set requested expression to
^/pagename/?
- Leave response status code equal 301
- Set source item to the actual page item serving that redirect request
- Do not forget to publish redirect pattern (and module itself if not yet)
Then as I hit http://myhostname/pagename/ I am being redirected to desired page with 301 status code.
Hope this helps and please let us know if that worked out for you.
来源:https://stackoverflow.com/questions/33104681/redirect-module-in-sitecore