PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   Bug Tracker (http://www.phpdig.net/forum/forumdisplay.php?f=27)
-   -   /~username robots.txt issue - With Fix (http://www.phpdig.net/forum/showthread.php?t=2110)

influxx 08-15-2005 07:37 AM

/~username robots.txt issue - With Fix
 
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:
Code:

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

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:
Code:

[a-z0-9_/*+%.~-]
So the - is at the end, or try:
Code:

$allowed_link_chars
In place of:
Code:

[a-z0-9_/*+%.-]*
And add to top of the function:
Code:

global $allowed_link_chars;


All times are GMT -8. The time now is 01:57 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.