PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Troubleshooting

Reply
 
Thread Tools
Old 02-03-2004, 05:53 AM   #1
JPS
Green Mole
 
Join Date: Feb 2004
Posts: 5
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
JPS is offline   Reply With Quote
Old 02-05-2004, 07:54 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
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); 
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 02-05-2004, 03:12 PM   #3
JPS
Green Mole
 
Join Date: Feb 2004
Posts: 5
Actualy I add those lines but nothing change !

Still not working

Thank's for your help
JPS is offline   Reply With Quote
Old 02-05-2004, 03:34 PM   #4
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. Did you reindex, or index new pages, after the changes were made?
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 02-05-2004, 11:31 PM   #5
JPS
Green Mole
 
Join Date: Feb 2004
Posts: 5
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
JPS is offline   Reply With Quote
Old 02-06-2004, 03:33 AM   #6
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
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?
vinyl-junkie is offline   Reply With Quote
Old 02-06-2004, 08:44 AM   #7
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
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.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 02-06-2004, 09:33 AM   #8
JPS
Green Mole
 
Join Date: Feb 2004
Posts: 5
Thank you Charter it's working fine now

JPS
JPS is offline   Reply With Quote
Old 02-06-2004, 10:09 AM   #9
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Great, glad it's working. BTW, did you leave in or take out the code in this post?
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 02-06-2004, 10:29 AM   #10
JPS
Green Mole
 
Join Date: Feb 2004
Posts: 5
Yes I leave it, at first I try without but it did not work.

Regards
JPS is offline   Reply With Quote
Old 02-06-2004, 10:36 AM   #11
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Okay, thanks.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Reply

Thread Tools

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
how much disk&db space need for first phpdig install 01php Script Installation 1 03-21-2007 07:09 PM
Another URL Question please. Kenny How-to Forum 2 12-01-2004 05:17 AM
How to unlock an URL philbihr How-to Forum 2 11-08-2004 04:11 AM
Suggest URL Dave A How-to Forum 1 08-18-2004 06:51 PM
Index ignores directory with space in it Gakk Simian Troubleshooting 2 04-09-2004 09:03 AM


All times are GMT -8. The time now is 12:46 AM.


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