SPACE IN url

By wktd | March 16, 2010

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

    http://cartouche-epson.1000cartouches.com/imprimantes_EPSON_Stylus%20Color_670.html

    or

    http://cartouche-epson.1000cartouches.com/imprimantes_EPSON_Stylus 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


  • Hi. Untested, but perhaps try the following.

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

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

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

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


  • Okay, thanks. :)


  • Or instead of this$eval = str_replace(" ","%20",$eval);
    try this$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?


  • Great, glad it's working. BTW, did you leave in or take out the code in this (http://www.phpdig.net/showthread.php?s=&postid=2101#post2101) post?


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


  • Thank you Charter it's working fine now

    JPS


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

    Regards :)


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

    First, in phpdigExplore find:

    while (eregi("(]*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:

    while (eregi("(]*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:

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

    and replace with:

    while (eregi("]*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.


  • 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


  • Actualy I add those lines but nothing change !

    Still not working

    Thank's for your help







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about SPACE IN url , Please add it free.

    Topics: enart.zjbr.com | edit

    Ftp from another pc retrieve a node path with getPath