Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Erin Gibbs 9 posts 80 karma points
    Oct 28, 2021 @ 18:25
    Erin Gibbs

    Static Redirects in Web.config

    Hello! I am looking for assistance with static redirects in the web.config file.

    I am publishing a new website for a customer, same domain, just need to keep SEO cred by redirecting their old "[domain].com/contact.php" url to the new "[domain].com/contact/" (and about 8 other pages like that).

    I'm used to using a rewritemap.config in the root folder, and then having the configSource here:

         <rewriteMaps configSource="rewritemaps.config" />     
                <rule name="Redirect rule1 for Redirects">
                  <match url=".*" />
                  <add input="{Redirects:{REQUEST_URI}}" pattern="(.+)" />
                  <action type="Redirect" url="{C:1}" appendQueryString="false" />

    However, the syntax has changed and what I've tried didn't take for some reason. Any help is appreciated!

  • Jonathon Cove 12 posts 83 karma points
    15 days ago
    Jonathon Cove

    I know this is an old question, but I found you can use the standard IIS rerouting method. Here's an article I found helpful:

Please Sign in or register to post replies

Write your reply to: