Solved

IIS 7 URL Redirects

Posted on 2015-02-06
5
94 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 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 16

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
Wondering how you can get your new website ranking on Google Search so that people find you online?  The answer is Search Engine Optimization (SEO). So how do you Start Ranking a New site with SEO?  Below is a starter guide to get your new website S…
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.

896 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

15 Experts available now in Live!

Get 1:1 Help Now