IIS Url Rewrite

Working on organizing a growing web site, and I've reorganized 20 or so pages into a sub folder. I updated the site map. Google sees the new pages, but is listing the old pages as 404, so I'm looking for techniques to tell Google they've been moved. The whole thing is pretty criptic. Here's what I have. I'm testing this on three pages, I'll do the rest of them if this works. 

Related Articles

... and you 'll find more on the IIS Administration Menu

The old URL was https://anchoredmarriage.com/Douglas_Park.aspx, the new one is https://anchoredmarriage.com/venues/Douglas_Park.aspx. I added the following markup to the web config file; now if you enter the first URL in a browser you should get redirected to the latter. 

Hopefully. 

If you are a web site admin, I'd appreciate your feedback. 

 

<system.webServer>
  <rewrite>
    <rules>
 
      <rule name="Douglas_Park"  stopProcessing="true">
        <match url="^Douglas_Park\.aspx"  />
        <action type="Redirect" redirectType="Permanent" url="/venues/Douglas_Park.aspx"/>
      </rule>
 
      <rule name="Alan_Shepard_Park"  stopProcessing="true">
        <match url="^Alan_Shepard_Park\.aspx"/>
        <action type="Redirect" redirectType="Permanent" url="/venues/Alan_Shepard_Park.aspx"/>
      </rule>
 
      <rule name="Kiwanis_Park_at_Geiger_Point" stopProcessing="true">
        <match url="^Kiwanis_Park_at_Geiger_Point\.aspx"/>
        <action type="Redirect" redirectType="Permanent" url="venues/Kiwanis_Park_at_Geiger_Point.aspx"/>
      </rule>
 
    </rules>
  </rewrite
</system.webServer>

A word of warning: the 'Redirect' directive above is permanent and will be cached by Edge. That means that if you mistype something, it will stay that way (for the browser on your desktop)

In order to get Edge to clear its cache, follow this:


Open Edge and click the three-dot menu in the top-right corner.

Select Settings.

In the left sidebar, click Privacy, search, and services.

Scroll down to the Clear browsing data section.

Click Choose what to clear.

In the pop-up:

Set the Time range (e.g., "Last hour", "24 hours").

Check Cached images and files (and any other data you want to clear).

Click Clear now.

This will remove cached files. Probably don't do 'All Time', or you'll lose all your logins 

***If you're troubleshooting a specific site, you can also try opening it in an InPrivate window to bypass the cache temporarily.

 

 


RealWorldCode gives developers practical, real‑world solutions with clean, working code — no fluff, no theory, just answers.
Links
Home
Knowledge Areas
Sitemap
Contact
Et cetera
Privacy Policy
Terms and Conditions
Cookie Preferences