PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Bug Tracker

Reply
 
Thread Tools
Old 09-24-2004, 06:37 AM   #1
blueyed
Green Mole
 
Join Date: Sep 2004
Posts: 19
Exclamation relative links without URI but only "?bla=1"

It seems that PhpDig (1.8.3) follows links like

<a href="?a=1&amp;b=2">link</a>

on http://localhost/path

to http://localhost?a=1&amp;b=2

instead of

http://localhost/path?a=1&amp;b=2
blueyed is offline   Reply With Quote
Old 10-12-2004, 06:05 AM   #2
blueyed
Green Mole
 
Join Date: Sep 2004
Posts: 19
FIXED..

in admin/robot_functions in line 780 add this:


Code:
             elseif (substr($regs[8],0,1) == "?") {
                  $links[$index] = phpdigRewriteUrl($path.$file.$regs[8]);
             }
This way links like
HTML Code:
<a href="?param=1">Link</a>
on a page like http://domain.com/subdir/file are followed as http://domain.com/subdir/file?param=1 and not http://domain.com/subdir/?param=1

I hope this makes it into the next release.

Thank you.
blueyed is offline   Reply With Quote
Old 12-03-2004, 03:05 AM   #3
blueyed
Green Mole
 
Join Date: Sep 2004
Posts: 19
bugfix: handle href="?getparam=x" correctly

please see http://www.phpdig.net/forum/showthread.php?t=1361
blueyed is offline   Reply With Quote
Old 12-06-2004, 03:23 AM   #4
blueyed
Green Mole
 
Join Date: Sep 2004
Posts: 19
Fix for the fix.. replace the code I've suggested with this one.

The previous code would build links like "someuri.html?page=5?page=6".. :/

Code:
elseif( $regs[8]{0} == '?' )
{ // path/file is a query string - cut it from base file
  $links[$index] = phpdigRewriteUrl( $path.preg_replace( '#\?.*#', '', $file ).$regs[8] );
}
It's below
Code:
elseif (substr($regs[8],0,1) == "/") {
  $links[$index] = phpdigRewriteUrl($regs[8]);
}
and above
Code:
else {
  $links[$index] = phpdigRewriteUrl($path.$regs[8]);
}
blueyed is offline   Reply With Quote
Reply


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
shows blank page if "Search All" and "exact phrase", timeout? alokjain9 Troubleshooting 2 03-07-2006 08:08 AM
"search depth" and "links per" features laurentxav How-to Forum 1 01-12-2005 08:27 PM
Problem with indexing "links found : 0" IAMHHawaii Troubleshooting 1 09-20-2004 01:06 PM
PhpDig "clipping" links while spidering jinkas Troubleshooting 5 08-02-2004 04:04 AM
Spidering with "links found : 0" fransdars Troubleshooting 4 02-02-2004 01:03 AM


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


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