views:

62

answers:

1

I am trying to preserve old links such as index.php?pageid=123 to the now current /accounts/home. No part of the original URL has to be included in the redirect.

I have a big list of old page links and their new address. I thought it would be really simple to say index.php?pageid=123 = /accounts/home but I can't see how to do it. Most of the examples I see are the other way around whereby your site uses query string and you want your URLs to be SEO friendly. I'm using IIS 7.5 to rewrite.

Thanks

A: 

Got it sorted and it wasn't that hard really. Just needed to add the query string as a condition.

    <rules>
        <rule name="accounting" patternSyntax="Wildcard" stopProcessing="true">
            <match url="index1.php" />
            <conditions>
                <add input="{QUERY_STRING}" pattern="page=accounts/accountsmain" />
            </conditions>
            <action type="Redirect" url="business-services/accounting.aspx" appendQueryString="false" />
        </rule>
    </rules>
Max