Solved

IIS 7 URL Redirects

Posted on 2015-02-06
5
92 Views
Last Modified: 2015-02-26
Windows server 2008 r2 / IIS 7.0

I have a few thousand property listings pages that are indexed by search engines,
here is an example url: http://www.mysite.com/12345/123-myStreet-myCity-myState.html

I need to redirect to: http://www.mysite.com/A12345/123-myStreet-myCity-myState.html

As my Listing ID numbers will soon be updated to prepend an "A".

 Is this possible to do this without manually writing a redirect for each individual page?

Thanks!
0
Comment
Question by:Bang-O-Matic
  • 2
  • 2
5 Comments
 
LVL 39

Expert Comment

by:Kyle Abrahams
Comment Utility
There's a url re-write utility that you can install to accomplish this.  

Here's a walkthrough on how to use it:
http://www.iis.net/learn/extensions/url-rewrite-module/url-rewrite-module-video-walkthrough

Essentially download and install the module, then you'll be able to configure a rule to append the A in your link.
0
 

Author Comment

by:Bang-O-Matic
Comment Utility
Hi Kyle,
I already have url rewrite mod installed.
I was looking for guidance on configuring the rule. Sorry i wasnt more specific.
0
 
LVL 16

Assisted Solution

by:Lucas Bishop
Lucas Bishop earned 250 total points
Comment Utility
I believe this back reference will achieve your goal:

                <rule name="Redirect" stopProcessing="true">
                    <match url="^12345$|^12345/(.*)" />
                    <action type="Redirect" url="A12345/{R:1}" appendQueryString="true" />
                </rule>

Open in new window

0
 
LVL 39

Accepted Solution

by:
Kyle Abrahams earned 250 total points
Comment Utility
from:
http://forums.iis.net/t/1169518.aspx
 <rewrite>
            <rules>
        <rule name="RewriteSubFolder" stopProcessing="true">
   <conditions>
                        <add input="{HTTP_HOST}" pattern="^www\.site1\.com$" />
                        <add input="{URL}" pattern="^/A$" />
                    </conditions>
               <action type="Rewrite" url="/A{R:0}" />
   </rule>
            </rules>
        </rewrite>
0
 

Author Comment

by:Bang-O-Matic
Comment Utility
I havent had a chance to test this yet, but I'm going to go ahead and award the points. Thanks for the help!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Read about how to approach blogging and about ways to do it right. Stand out from the crowd and let your knowledge be consumed by a large audience. This article aims to explain how your blog should look like,  the most important things to do while b…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now