exculde a php file with variables with robots.txt

Discussion in 'HTML & Website Design' started by alexmart, Nov 3, 2005.

  1. #1
    Hello

    I have a script that tracks downloads. The URL is in this format :

    http://www.site.com/dl.php?var1=string&var2=string

    What is the correct command to restrict bots from spidering that file using robots.txt ?
    Will "Disallow: /dl.php" be enough ?


    Thanks
     
    alexmart, Nov 3, 2005 IP
  2. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #2
    >> Will "Disallow: /dl.php" be enough ?
    Yes. That will disallow *any* file beginning with the string "dl.php" (without the quotes).
     
    exam, Nov 3, 2005 IP