Is there a way to use the search in link sql so the search returned answer with clean url. So if I search for term in the site the url will be like html page?
Oct 6, 2004, 9:01 AM
Veteran / Moderator (18436 posts)
Oct 6, 2004, 9:01 AM
Post #2 of 16
Views: 4349
You mean like the below?
http://gadgets-shopping.com/ (very bottom of the page).
I've set the SearchLogger Plugin up on this site, which I then use to show the direct links (great for getting Google to deep-spider your products).
Basically, the way I do it, is;
<%build_root_url%>/search/<%cleanup_query($query)%>
Then, make a new global (called cleanup_query) ... with the following;
my $code = $_[0];
$code =~ s/([\x{80}-\x{FFFF}])/'&#' . ord($1) . ';'/gse;
return $code;
}
... and then, set up something like this in a .htaccess file;
Hope that helps ... was meant to be going out 5 mins ago ... so I'm afraid thats as detailed as I can give
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
http://gadgets-shopping.com/ (very bottom of the page).
I've set the SearchLogger Plugin up on this site, which I then use to show the direct links (great for getting Google to deep-spider your products).
Basically, the way I do it, is;
<%build_root_url%>/search/<%cleanup_query($query)%>
Then, make a new global (called cleanup_query) ... with the following;
Code:
sub { my $code = $_[0];
$code =~ s/([\x{80}-\x{FFFF}])/'&#' . ord($1) . ';'/gse;
return $code;
}
... and then, set up something like this in a .htaccess file;
Code:
RewriteRule ^search/.* /cgi-bin/links/search.cgi?query=$1 [L]Hope that helps ... was meant to be going out 5 mins ago ... so I'm afraid thats as detailed as I can give

Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Oct 6, 2004, 11:31 AM
Veteran (1119 posts)
Oct 6, 2004, 11:31 AM
Post #3 of 16
Views: 4277
Hi Andy,
Thanks for the great post, Man.. you don't quit to surprise :)
Can you tell me how to fix/update the space with (-) in
http://www.gadgets-shopping.com/search/carbon%20brushes so it would look like
http://www.gadgets-shopping.com/search/carbon-brushes
Vishal
Vishal
-------------------------------------------------------
Thanks for the great post, Man.. you don't quit to surprise :)
Can you tell me how to fix/update the space with (-) in
http://www.gadgets-shopping.com/search/carbon%20brushes so it would look like
http://www.gadgets-shopping.com/search/carbon-brushes
Vishal
Vishal
-------------------------------------------------------
Oct 7, 2004, 12:30 AM
Veteran / Moderator (18436 posts)
Oct 7, 2004, 12:30 AM
Post #4 of 16
Views: 4250
Quote:
Thanks for the great post, Man.. you don't quit to surprise :)
Quote:
Can you tell me how to fix/update the space with (-) in http://www.gadgets-shopping.com/search/carbon%20brushes so it would look like
http://www.gadgets-shopping.com/search/carbon-brushes
Unfortunatly you can't (at least not without some quite big hacking).
Basically, due to the way that the mod_rewrite simply "passes" the query along to search.cgi ... there is nowhere that can replace - with " " (AFAIK).
If I was to do this on my site... I would modify the global that is used to show the SearchLogger top results, so that it does;
$query =~ s| |-|gi;
.. but, like I said ... the - holds value in a search, thus if you called;
http://www.gadgets-shopping.com/search/carbon-brushes
...woudl translate to;
http://www.gadgets-shopping.com/cgi-bin/search.cgi?query=carbon-brushes
(i.e with the - still in it).
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Hi Andy, thanks for the tip.
On the first page of the search results I do get a clean path, such as
http://www.gadgets-shopping.com/search/paris
But the second page has a messy path such as
http://www.gadgets-shopping.com/search/search.cgi?query=paris;isValidated=Yes&nh=2
What can I do to get a clean path like the one of the first page that will look like this:
http://www.gadgets-shopping.com/search/paris-2
I saw that you can't download the SearchLogger Plugin from the plugin page. Where can I find it?
On the first page of the search results I do get a clean path, such as
http://www.gadgets-shopping.com/search/paris
But the second page has a messy path such as
http://www.gadgets-shopping.com/search/search.cgi?query=paris;isValidated=Yes&nh=2
What can I do to get a clean path like the one of the first page that will look like this:
http://www.gadgets-shopping.com/search/paris-2
I saw that you can't download the SearchLogger Plugin from the plugin page. Where can I find it?
Oct 8, 2004, 3:23 AM
Veteran / Moderator (18436 posts)
Oct 8, 2004, 3:23 AM
Post #6 of 16
Views: 4260
Quote:
http://www.gadgets-shopping.com/search/search.cgi?query=paris;isValidated=Yes&nh=2Mmm... you would need to edit the <%next%> and <%prev%> tags (not too easy).The first page should be all you need, as it gives Google (and other spiders) something to feed on

I'll post more info as i develop this futher (I'm always trying to increase my SE rankings =)).
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Oct 8, 2004, 3:50 AM
Veteran / Moderator (18436 posts)
Oct 8, 2004, 3:50 AM
Post #8 of 16
Views: 4252
Quote:
Where can I find the SearchLogger plugin?Should be able to download it from Plugins > Plugin Download > List All > (keep clicking "Next 10", until you see it listed).
Hope that helps.
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Hi Andy, in my site the LinkSql is installed in the dir folder and the search.cgi page is in this folder and not the cgi-bin.
I changed the path
RewriteRule ^search/.* /cgi-bin/links/search.cgi?query=$1 [L]
To
RewriteRule ^search/.* /dir/search.cgi?query=$1 [L]
But when I enter a query, the search engine does not present result but shows the default page of the cgi (as if no results were found, although the regular search shows that there are results). Is there another change I should make because the search is in the dir folder?
I changed the path
RewriteRule ^search/.* /cgi-bin/links/search.cgi?query=$1 [L]
To
RewriteRule ^search/.* /dir/search.cgi?query=$1 [L]
But when I enter a query, the search engine does not present result but shows the default page of the cgi (as if no results were found, although the regular search shows that there are results). Is there another change I should make because the search is in the dir folder?
Oct 8, 2004, 5:57 AM
Veteran / Moderator (18436 posts)
Oct 8, 2004, 5:57 AM
Post #10 of 16
Views: 4217
Mmm... I'm not quite sure what you mean.
Does your folder setup look something like;
public_html/
public_html (root of the site)
public_html/dir
public_html/dir/admin (LSQL admin folder)
? If so, try;
RewriteRule ^search/(.*) dir/search.cgi?query=$1 [L]
(not the missing / in front of "dir").
Hope that helps.
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Does your folder setup look something like;
public_html/
public_html (root of the site)
public_html/dir
public_html/dir/admin (LSQL admin folder)
? If so, try;
RewriteRule ^search/(.*) dir/search.cgi?query=$1 [L]
(not the missing / in front of "dir").
Hope that helps.
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
My problem with the path is this- I get a path that looks like this
http://www.mysite.com/dir/search/ that gives me the search form of the cgi.
But when I write something else such as http://www.mysite.com/dir/search/shoes or another search term, I still get the search form instead of results. How can I get to the search results through this style of path?
I really appreciate your help J
http://www.mysite.com/dir/search/ that gives me the search form of the cgi.
But when I write something else such as http://www.mysite.com/dir/search/shoes or another search term, I still get the search form instead of results. How can I get to the search results through this style of path?
I really appreciate your help J
Oct 8, 2004, 7:32 AM
Veteran / Moderator (18436 posts)
Oct 8, 2004, 7:32 AM
Post #12 of 16
Views: 4193
Mmm... you sure there should be results for "shoes" ?
Another way to try it, is change the [L] to [R] , which should "redirect" to the page (and show you the URL that its redirecting to).
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Another way to try it, is change the [L] to [R] , which should "redirect" to the page (and show you the URL that its redirecting to).
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Oct 8, 2004, 8:59 AM
Veteran / Moderator (18436 posts)
Oct 8, 2004, 8:59 AM
Post #14 of 16
Views: 4181
Sorry, should have spotted this earlier :(
RewriteRule ^search/.* dir/search.cgi?query=$1 [L]
...should be;
RewriteRule ^search/(.*) dir/search.cgi?query=$1 [L]
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
RewriteRule ^search/.* dir/search.cgi?query=$1 [L]
...should be;
RewriteRule ^search/(.*) dir/search.cgi?query=$1 [L]
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Oct 8, 2004, 9:19 AM
Veteran / Moderator (18436 posts)
Oct 8, 2004, 9:19 AM
Post #16 of 16
Views: 4195
No worries =)
I've updated the original post, with the new mod_rewrite code (to avoid any future confusion that may occur ;p).
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
I've updated the original post, with the new mod_rewrite code (to avoid any future confusion that may occur ;p).
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!