Forum Moderators: open

Message Too Old, No Replies

Pattern Matching Redirect IIS 6.0

         

dertyfern

6:31 pm on Mar 28, 2009 (gmt 0)

10+ Year Member



I'm using II6 and I'm undergoing a url rewrite project to create friendly urls from existing ugly ones that use a query string.

Problem is: I've got hundreds of old urls which have SE rankings and I want to preserve their "history". Is there any way to permanently redirect them all using pattern matching with IIS 6?

Thanks in advance for any input.

dertyfern

7:58 pm on Mar 28, 2009 (gmt 0)

10+ Year Member



Think I may have found an answer to my question--would this work adequately while preserving history?:

<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","/new-page.asp");
}
</script>

dertyfern

4:46 pm on Mar 29, 2009 (gmt 0)

10+ Year Member



Anyone? I'm certain there must be someone who's dealt with this.

dertyfern

5:13 pm on Mar 30, 2009 (gmt 0)

10+ Year Member



Got the answer. Thanks for all the help out there. If anyone need to know who this is done properly please don't hesitate to sticky.

coopster

5:04 pm on Mar 31, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Did you consider perhaps that nobody else knew the solution? Rather than throw out the sarcasm why not publish the solution for future readers having the same issue? :)