PDA

View Full Version : /~username robots.txt issue - With Fix


influxx
08-15-2005, 07:37 AM
PhpDig v.1.8.7

Issue:
If a robots.txt file Disallows searching a user directory (/~username) PhpDig interprets this as Disallow: / (everything)

Solution:
In the robot_functions.php in function phpdigReadRobotsTxt on Line 917 change:

if (eregi('[[:blank:]]*disallow:[[:blank:]]*([/]?([a-z0-9_/*+%.-]*))',$line,$regs))

To:

if (eregi('[[:blank:]]*disallow:[[:blank:]]*([/]?([a-z0-9_/*+%.-~]*))',$line,$regs))
Note the addition of a '~' in the regular expression.

Charter
08-15-2005, 09:55 AM
Thanks. :)

Just change it to the following:

[a-z0-9_/*+%.~-]

So the - is at the end, or try:

$allowed_link_chars

In place of:

[a-z0-9_/*+%.-]*

And add to top of the function:

global $allowed_link_chars;