PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Bug Tracker

Reply
 
Thread Tools
Old 08-15-2005, 07:37 AM   #1
influxx
Green Mole
 
Join Date: Jul 2005
Posts: 1
/~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.
influxx is offline   Reply With Quote
Old 08-15-2005, 09:55 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
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;
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
robots.txt seems to be ignored :? galacticvoyager Bug Tracker 1 11-12-2005 12:52 PM
robots.txt and URL djavet How-to Forum 4 01-11-2005 03:19 AM
robots.txt versus robotsxx.txt Charter IPs, SEs, & UAs 0 03-11-2004 06:00 PM
robots.txt ignored roy Troubleshooting 3 02-20-2004 08:02 PM
robots.txt renehaentjens Troubleshooting 3 12-05-2003 02:40 PM


All times are GMT -8. The time now is 07:11 PM.


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