Redirection and Substitution rules
Table of contents
Both Redirection and Substitution rules change the incoming URL to point somewhere else. The main difference is that substitution rules replace the matching section of the URL using wildcards, while the Redirection rule is used recursively to replace a different section of the URL. The Substitution rule is great for when you need to change a folder name and do not want URLs to change. Redirection can be used to hide the Domino file extensions.
Redirection rules can be used on the server for various reasons:
- Provide aliases for databases:
Sometimes it is helpful to have a shorter name or alias for a database that will be accessed via HTTP. For this reason, we can create a Redirection document on the Domino server to make it easier for users to reach our application, or specific pages or resources within the application.
- Disguise the Domino HTTP server:
For security reasons, it may be helpful to disguise the specific type of server that is hosting our Web applications. If a user knows that a Domino server is serving an application, that user can try to craft attacks to exploit vulnerabilities specific to that type of server. Redirection rules can be used so that users do not see that an application has an .nsf extension, and HTTP response header rules can be used to override the Server response header.
Substitution rules use wildcards. If you do not use one, then the server appends /* to the end of the rule. You can use the rule on the server for the following reasons:
- Move folders:
You need to move databases to a new folder but don't want to have old URLs break. A substitution rule with an incoming pattern of /help/* and a replacement pattern of /product/docs, would let the user access the databases in product/docs with either /help/ or /product/docs in the URL.
- Make the URL easier to remember:
So that the user does not have to remember www.riverbendcoffee.com/web/docs/supporthelp.nsf/help.html, you make a substitution rule to change it to www.riverbendcoffee.com/help.