301 redirects

Discussion in 'Apache' started by NeverTheSame, Feb 13, 2008.

  1. #1
    I read the sticky but I still can't understand what 301 redirects are. Could someone please tell me?

    Thanks.
     
    NeverTheSame, Feb 13, 2008 IP
  2. boltok

    boltok Active Member

    Messages:
    257
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    78
    #2
    These are headers that the web server uses to inform your browser that a file has permanently moved and the location it has been moved to.
     
    boltok, Feb 13, 2008 IP
  3. NeverTheSame

    NeverTheSame Peon

    Messages:
    94
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Care to explain some more? Elaborate a bit?
     
    NeverTheSame, Feb 13, 2008 IP
  4. boltok

    boltok Active Member

    Messages:
    257
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    78
    #4
    Your browser usually sends a "GET" request, asking for a specific page from the web server. The web server replies with a return code and some data related to this.

    These return code is in the form of a number, such as 200 (for "ok"), 404 (for "page not found") and 500 ("internal server error"). One of these return codes is 301 which tells the browser that the file has moved permanently.

    You can get more info on HTTP return codes here:

    http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

    Once the browser receives this and the accompanying value of the new location (in the form of a URL), it knows the new location it has to look for the file and sends another request starting the process again.

    Hope that's what you were looking for.
     
    boltok, Feb 13, 2008 IP