-
Notifications
You must be signed in to change notification settings - Fork 158
How to deal with the web.config size limit in order to add URL redirects
dessyordanova edited this page Nov 10, 2016
·
1 revision
We will use the URL Rewriter for .NET library to create a module for adding URL redirects in an external file since the web.config
file has a limit.
1. In the web.config
file add the following changes to include the rewriter module:
<configuration>
<configSections>
<section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />
</configSections>
<system.web>
<httpModules>
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter" />
</httpModules>
</system.web>
<rewriter configSource="urlrewriter.config">
</rewriter>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter" />
</modules>
</system.webServer>
</configuration>
2. Create bin
folder and put the Intelligencia.UrlRewriter.dll:
3. Use an external file (urlrewriter.config) to put all redirects indicating which URL to which one to be navigated:
- Home
- Getting Started
- Deploying Documentation on IIS
- Git and GitHub Workflow
- Handling Redirects
- Markdown Syntax
- Markdown Nesting
- Using Git and Git Bash
- Troubleshooting
- Use VS Diff tool with Git and SourceTree
- [How to deal with the web.config size limit in order to add URL redirects](./How to deal with the web.config size limit in order to add URL redirects)