301 redirect old page to new page

Discussion in 'Windows / IIS' started by Nelly, Feb 28, 2012.

  1. Ive been researching for what amount to ages.

    Problem

    i created an article on one of my sites and it has been indexed

    a week later im about to promote the article and notices a simple spelling mistake.

    i corrected (one letter) and obviously realised that ive inadvertently changed the url.

    now this will create duplicate issues so i thought a simple 301 redirect would do the trick, so i have logged into iis7 manager but because the script is dynamic that generates html pages i cannot see them to select and point the redirection.

    what is the best solution, i came across this snippet of code:

    <%@ Language=VBScript %>
    <%
    Response.Status="301 Moved Permanently"
    Response.AddHeader "Location", "/new-page.asp"
    %>


    but if i cant see the page where am i supposed to put it

    does "location" mean the old url and "/new-page.asp" obviously the new page to point to?

    could really do with a few pointers as what ( in my opinion) should have been a simple job has got me a little irate!!

    thanks in advance

    Nelly
     

Share This Page