Conflict with Baidu search engine

3 views
Skip to first unread message

Cameron

unread,
May 3, 2009, 4:03:14 AM5/3/09
to webanywhere-dev
www.baidu.com is the most popular search engine in China. However,
there is a conflict with WA in its index which mistakes PHProxy's "q="
argument as its keywork argument. Some strange text will be added to
its search box. Just open "www.baidu.com" in WA to reproduce the
problem.

Following code in its index is the root cause.

(function(){
if(new RegExp("q=([^&]+)").test(location.search)){
w.value=decodeURIComponent(RegExp.$1)
}
})();

To solve this problem, we need to change value "url_var_name" to
string that not ended with "q".
This is the original code in wawp.php:
'url_var_name' => 'q',
I am going to change it to:
'url_var_name' => 'proxy_url',

Cameron

Cameron

unread,
May 3, 2009, 4:39:19 AM5/3/09
to webanywhere-dev
P.S.
We also need to change following line in config.php
$wp_path = $root_path . '/wp/wawp.php?proxy_url=$url$';

Cameron
Reply all
Reply to author
Forward
0 new messages