Solved

IIS 7 URL Redirects

Posted on 2015-02-06
5
100 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 40

Expert Comment

by:Kyle Abrahams
ID: 40594684
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
ID: 40595608
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 18

Assisted Solution

by:Lucas Bishop
Lucas Bishop earned 250 total points
ID: 40596534
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 40

Accepted Solution

by:
Kyle Abrahams earned 250 total points
ID: 40599084
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
ID: 40633621
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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
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…
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.

617 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