?
Solved

IIS 7 URL Redirects

Posted on 2015-02-06
5
Medium Priority
?
103 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 1000 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 1000 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

With more and more people tethered to the internet, advertisers can reach you in new and creative ways. Push notifications on your smartphone, customized advertisements based on your previous searches, and email inboxes filled with promotional pitch…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
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.
Suggested Courses

719 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