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 on a windows server

Discussion in 'C#' started by ginostylz, May 3, 2004.

  1. #1
    I found this, but it only works if the original page that the redirect is is an .asp page. I'd like to change a .htm page into another page

    <%@ Language=VBScript %>
    <%
    Response.Status="301 Moved Permanently"
    Response.AddHeader "Location", "http://www.automotivetouchup.com"
    %>

    I'd also love to take my affiliate program and allow my affiliate links to count as inbounds. The page that the affiliate link goes to looks like this:


    <%
    MerchantID = Request.QueryString("MerchantID")
    ' Perform DefaultParameter processing.
    If IsEmpty(MerchantID) Or MerchantID = "" Then
    MerchantID = 0
    End If

    session("mallid")=MerchantID

    ' find next page to display
    ipaddress = (Request.ServerVariables("SERVER_NAME"))

    whatsnext = (Request.QueryString("NextPage"))
    ' Perform DefaultParameter processing.
    If IsEmpty(whatsnext) Or whatsnext = "" Then
    whatsnext = "index.htm"
    End If

    gostring = "http://" & ipaddress & "/" & whatsnext

    Response.Redirect (gostring)

    %>

    Is there something I'd need to change to make them count as a backlink using a 301 redirect, but still keep tracking? Any help is much, much appreciated.
     
    ginostylz, May 3, 2004 IP
  2. TampaDave

    TampaDave Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Instead of doing a redirect, you might want to look at Server.Execute("YourPage.asp")

    Works like an include, executes the code of another page on the current page.

    Example:
    If you only wanted to show a section to a logged in member, all you would need to do is checked login status and then execute:

    If vLoggedIn = True then Server.Execute("special-page.asp")

    By keeping the page the same I think you cna get the search engine associatios you're looking for.
     
    TampaDave, May 5, 2004 IP
  3. ginostylz

    ginostylz Well-Known Member

    Messages:
    240
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    138
    #3
    One was originally a page that no longer exists, and people still link to it, so I wanted to get Google to count it still as a link,

    The one were I displayed a lot of code is an affiliate page. If a consumer clicks on it the affiliate gets a commision. Google counts a 301 redirect as a backlink, which should help in search results. I was curious if the code was to be changed, would affiliates still get commisions, and would Google still count the page?

    I'm trying to get imbound links outside of trading them, I have about 50 affiliates, but most of them are not bringing any traffic.
     
    ginostylz, May 5, 2004 IP
  4. dave487

    dave487 Peon

    Messages:
    701
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I recently changed my affiliate links so that they 301 redirected using php to the root of my domain. It all seems to work OK and am now waiting for the next backlink update. :)
     
    dave487, May 20, 2004 IP