I just installed the URL Rewrite Module for Sitecore 8.1. However, I do not believe the simple redirects are working correctly. I get my page not found page versus getting the page I want redirected to. The documentation is not very clear either. I need to know what is the proper format for the Path field in the in Simple Redirect template. For example, do I put in http://www.xyzcompany.com/about/test/testpage or /about/test/testpage or what exactly is the proper format here? I just want an incoming old URL to go to the new URL, plain and simple. If someone has a working instance of URL Rewrite Module with Sitecore 8.1 that can help to make my simple redirects work I would greatly appreciate any insight. Thanks in advance!
In my investigation and research into this issue I spoke with Andy Cohen the contributor for this module and he let me know that here is the proper format for Simple Redirect paths:
http://xyzcompany.com/about would just be
about in the Path field just the name of the page.
However, if you have a page that is multiple pages deep you separate the folders with a pair of arms (regex stuff). It will look something like this:
http://xyzcompany.com/about/tom/dick/harry would be:
about\/tom\/dick\/harry in the Path field.
I verified this works and my redirects are working. Hope this helps someone else. Happy coding!
The simple redirects assume that your matching url is at the root. There is no need for a beginning forward slash.
When you installed the module, it comes with examples located at /sitecore/Content/Sample Rewrites. There is an example of both of these situations; one for external links and one for internal links, named accordingly:
Simple External Redirect
Target: http://www.sitecore.net (external link)
Simple Internal Redirect
Target: /Home (internal link to an item)
If your path was more complex and had multiple segments, you just need to make sure that you properly escape the forward slashes:
Generally, the module works exactly like the IIS rewrite module. Here is the most recent blog post that I have written on my module: https://blog.horizontalintegration.com/2016/09/08/sitecore-url-rewrite-backreferences/. If you need anything else, bug reports, feature requests, etc... let me know.
The path should be the relative to the root of the site (no scheme or domain). It sounds like you also have an error page module or custom built functionality also installed. My guess is that module is running and returning your 404 page before the URL Rewrite module has a chance to run. Check the httpRequestBegin pipeline in /sitecore/admin/showconfig.aspx to see if there is a not-found processor before the URL Rewrite. If so, try adjusting your patch configs so that the URL Rewrite module runs first.