PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   Troubleshooting (http://www.phpdig.net/forum/forumdisplay.php?f=22)
-   -   SPACE IN url (http://www.phpdig.net/forum/showthread.php?t=476)

JPS 02-03-2004 05:53 AM

SPACE IN url
 
I HAVE A SITE WITH ULR REWRITING and some url are have a space like:

http://cartouche-epson.1000cartouche...Color_670.html

or

http://cartouche-epson.1000cartouche...Color_670.html

This is no probleme for google that index these pages without probleme but phpdig don't. Is there some thing to change to get it ?

Regards

JPS

Charter 02-05-2004 07:54 AM

Hi. Untested, but perhaps try the following.

In robot_functions.php add the following to the phpdigRewriteUrl function:
PHP Code:

$eval str_replace(" ","%20",$eval); 

Also in robot_functions.php add the following to the phpdigUpdSpiderRow function:
PHP Code:

$path str_replace(" ","%20",$path);
$file str_replace(" ","%20",$file); 


JPS 02-05-2004 03:12 PM

Actualy I add those lines but nothing change !

Still not working

Thank's for your help

Charter 02-05-2004 03:34 PM

Hi. Did you reindex, or index new pages, after the changes were made?

JPS 02-05-2004 11:31 PM

I have delete a whole domain and reindex it. For exemple this domain http://cartouche-epson.1000cartouches.com/ has 14 links also normaly it should be more than 200 or 300

Regards

JPS

vinyl-junkie 02-06-2004 03:33 AM

Or instead of this
Code:

$eval = str_replace(" ","%20",$eval);
try this
Code:

$eval = str_replace(" ","",$eval);
Don't know if that will work, but it's worth a shot.

Also, and I have to ask this, how practical would it be for you to modify those URL's so there is no embedded space?

Charter 02-06-2004 08:44 AM

Hi. In robot_functions.php are two functions to edit.

First, in phpdigExplore find:
PHP Code:

while (eregi("(<frame[^>]*src[[:blank:]]*=|href[[:blank:]]*=|http-equiv=['\"]refresh['\"] *content=['\"][0-9]+;url[[:blank:]]*=|window[.]location[[:blank:]]*=|window[.]open[[:blank:]]*[(])[[:blank:]]*[\\\\'\"]?((([[a-z]{3,5}://)+(([.a-zA-Z0-9-])+(:[0-9]+)*))*([:%/?=&;\\\\,._a-zA-Z0-9\\|+-]*))(#[.a-zA-Z0-9-]*)?[\\\\'\" ]?",$eval,$regs)) { 

and replace with:
PHP Code:

while (eregi("(<frame[^>]*src[[:blank:]]*=|href[[:blank:]]*=|http-equiv=['\"]refresh['\"] *content=['\"][0-9]+;url[[:blank:]]*=|window[.]location[[:blank:]]*=|window[.]open[[:blank:]]*[(])[[:blank:]]*[\\\\'\"]?((([[a-z]{3,5}://)+(([.a-zA-Z0-9-])+(:[0-9]+)*))*([:%/?=&;\\\\,._a-zA-Z0-9\\|+ ()-]*))(#[.a-zA-Z0-9-]*)?[\\\\'\" ]?",$eval,$regs)) { 

Second, in phpdigIndexFile find:
PHP Code:

while (eregi("<a([^>]*href[[:blank:]]*=[[:blank:]]*[\\\\'\"]?(((http://)+(([.a-zA-Z0-9-])+(:[0-9]+)*))*([:%/?=&;\\\\,._a-zA-Z0-9-]*))[#\\\\'\" ]?)",$line,$regs)) { 

and replace with:
PHP Code:

while (eregi("<a([^>]*href[[:blank:]]*=[[:blank:]]*[\\\\'\"]?(((http://)+(([.a-zA-Z0-9-])+(:[0-9]+)*))*([:%/?=&;\\\\,._a-zA-Z0-9\\|+ ()-]*))[#\\\\'\" ]?)",$line,$regs)) { 

Now try another reindex. What are the results?

Remember to remove any "word" wrapping in the above code.

JPS 02-06-2004 09:33 AM

Thank you Charter it's working fine now

JPS

Charter 02-06-2004 10:09 AM

Great, glad it's working. BTW, did you leave in or take out the code in this post?

JPS 02-06-2004 10:29 AM

Yes I leave it, at first I try without but it did not work.

Regards :)

Charter 02-06-2004 10:36 AM

Okay, thanks. :)


All times are GMT -8. The time now is 10:21 PM.

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