[L=301] ??? .htaccess

Discussion in 'PHP' started by imchandan, Jun 12, 2008.

  1. #1
    Hey guys,
    What L=301 means ????
     
    imchandan, Jun 12, 2008 IP
  2. Lordo

    Lordo Well-Known Member

    Messages:
    2,082
    Likes Received:
    58
    Best Answers:
    0
    Trophy Points:
    190
    #2
    R=301
    This means the redirect is 301 (permanent) and this is useful for search engines when you change the domain or change a whole directory.
    L
    This means that this is the last rule (if matched). So, if the URL matches this rule, do not go any further in the htaccess file.
     
    Lordo, Jun 12, 2008 IP
  3. imchandan

    imchandan Guest

    Messages:
    50
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #3
    imchandan, Jun 12, 2008 IP
  4. Lordo

    Lordo Well-Known Member

    Messages:
    2,082
    Likes Received:
    58
    Best Answers:
    0
    Trophy Points:
    190
    #4
    1. L is not the key! R=301 is. Show me the htaccess file please.
    2. In order to remove the old URL from google, you must remove or change all links that point to it.
     
    Lordo, Jun 12, 2008 IP
  5. imchandan

    imchandan Guest

    Messages:
    50
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #5
    RewriteRule ^privacy-policy.html$ /privacy_policy.php [L]

    this rule says if you ask www.site.com/privacy-policy.html, if will give you www.site.com/privacy_policy.php, but still show www.site.com/privacy-policy.html in the browser (although privacy-policy.html doesn't exists) which is correct...
    the trouble part is previously google has indexed privacy_policy.php..... now i want if crawler comes next time to my site it should replace privacy_policy.php with privacy-policy.html....i.e. it should index www.site.com/privacy-policy.html instead of www.site.com/privacy_policy.php (although privacy-policy.html doesn't exists).... hope i am clear...
     
    imchandan, Jun 12, 2008 IP
  6. Lordo

    Lordo Well-Known Member

    Messages:
    2,082
    Likes Received:
    58
    Best Answers:
    0
    Trophy Points:
    190
    #6
    I know and I already told you about this (from my experience)

     
    Lordo, Jun 12, 2008 IP
  7. imchandan

    imchandan Guest

    Messages:
    50
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #7
    hey thanks for all your help.. so is this the only solution ??
    reason i am asking is because my site get a lot of traffic daily by google...
    one more thing, if needed to remove, how will i remove site from google's index ? log-in into google-webmaster and request for remove site ???
    thanks again. you'v been very helpful..
     
    imchandan, Jun 12, 2008 IP