Theme: default | dark | nature


Download Download

Haven't you wished for an easy way to do redirects in ASP.NET, ala Apache? Well, there is!

In your web.config file, add a section like this:

<?xml version="1.0"?>
    <section name="redirects" type="GLC.Tools.Configuration.XmlSerializerSectionHandler, GLC.Tools" />
  <redirects type="GLC.Tools.Modules.RedirectConfig, GLC.Tools">
    <add targetUrl="^~/SomePlace/" destinationUrl="~/SomeOtherPlace/" permanent="false" ignoreCase="true" mode="remote" />
      <add name="RedirectModule" type="GLC.Tools.Modules.RedirectModule, GLC.Tools" />

Valid values for the mode attribute are:

  • on - redirects always
  • local - redirects on localhost only
  • remote - redirects on non-localhost only
  • off - redirects never

Contact us today! Free consulting with no obligation.