Forum Moderators: open
They have said that this is the only way to do it - you can't do a page to page 301 redirect in IIS7 with that kind of query string, you can only send those requests to a single page, and that it can only be a 302 redirect.
<rule name="Legacy Category Product Redirect">
<match url="^cat/index\.cgi/shopfront/view_product_details$" />
<conditions>
<add input="{QUERY_STRING}" pattern="^category_id=([0-9]+)&product_id=([0-9]+)$" />
</conditions>
<action type="Redirect" url="default.aspx?cat={C:1}&prod={C:2}" appendQueryString="false" />
</rule>
The design company has come back and stated that they are unable to implement a rewrite module ... doing so would create processing overheads.
protected void Page_Load(object sender, EventArgs e)
{
string cat = Request.QueryString.Get("category_id");
string prod = Request.QueryString.Get("product_id");
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location", String.Format("http://www.example.com/default.aspx?cat={0}&prod={1}", cat, prod));
}