PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   Troubleshooting (http://www.phpdig.net/forum/forumdisplay.php?f=22)
-   -   Mod-rewrite = spidering / URL problems (http://www.phpdig.net/forum/showthread.php?t=2668)

jcnorris 10-25-2006 10:46 AM

Mod-rewrite = spidering / URL problems
 
Hello,

Couldn't quite get to the bottom of this via a search, but it seems that others have been there ...

Our rewrite rule renders .../index.php?section=4 to .../r-section-4

Spidering is getting confused and not getting into sub-pages, and search results often include a trailing slash (e.g., ".../r-section-4/").

The good news is that all of our rewritten url's begin with "r-", so I should be able to capture these, were I clever! The bad news is that I ain't that clever.

Would be happy to be pointed to an applicable thread, etc.

Thanks!

Charter 10-26-2006 09:38 AM

Untested but find in the phpdigRewriteUrl function:
Code:

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

// 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));



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.