1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

301 redirects for individual pages

Discussion in 'C#' started by jackslounge, Feb 17, 2008.

  1. #1
    Hi all,

    I am not overly experienced in ASP, so bear with me.

    I have 10 pages in a section that are all "generated" by an ASP file. I have just moved the site to wordpress, however I want to set up a 301 redirect on the old pages to the new ones in the blog.

    There is no universal naming convention I can really use - I want to redirect each individual page to another individual page.

    Any help on how to do this?

    Thanks
     
    jackslounge, Feb 17, 2008 IP
  2. vpguy

    vpguy Guest

    Messages:
    275
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    
    <%
    Response.Status = "301 Moved Permanently"
    Response.AddHeader "Location", "http://www.domain.com/new-folder/new-filename.asp"
    Response.End
    %>
    
    Code (markup):
     
    vpguy, Feb 17, 2008 IP
  3. Forrest

    Forrest Peon

    Messages:
    500
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If you're not running asp anymore, you need to do the redirects from within wordpress, which is php, which is Apache. Chances are you'll do it using mod_rewrite in the .htaccess file.
     
    Forrest, Feb 25, 2008 IP