PDA

View Full Version : Problem indexing site due to backslash


F.Keniki
12-12-2006, 01:52 PM
Hi I have a proble crawling site where the url is www.yoursite.com/example
as php dig adds a backslash and trys to crawl instead www.yoursite.com/example/ which produces a 404 error. Has anyone come accross this problem?

Any help gratefully recieved.

Charter
12-26-2006, 07:34 AM
Untested but find in the phpdigRewriteUrl function:

// phpdig 1.8.9 rc1

$retour['path'] = mb_ereg_replace('(.*[^/])/?$','\1/',mb_ereg_replace('^/(.*)','\1',mb_ereg_replace("/+","/",$path)));

// phpdig 1.8.8

$retour['path'] = ereg_replace('(.*[^/])/?$','\1/',ereg_replace('^/(.*)','\1',ereg_replace("/+","/",$path)));


And replace with the following:

// phpdig 1.8.9 rc1

$retour['path'] = mb_ereg_replace('^/(.*)','\1',mb_ereg_replace("/+","/",$path));

// phpdig 1.8.8

$retour['path'] = ereg_replace('^/(.*)','\1',ereg_replace("/+","/",$path));