[ic] Rewriting URLs for SEO purposes - help!

Cameron G ritontor at icenet.com.au
Tue Apr 12 04:55:14 EDT 2005


 

> -----Original Message-----
> From: interchange-users-bounces at icdevgroup.org 
> [mailto:interchange-users-bounces at icdevgroup.org] On Behalf 
> Of Jamie Neil
> Sent: Tuesday, 12 April 2005 4:30 PM
> To: interchange-users at icdevgroup.org
> Subject: Re: [ic] Rewriting URLs for SEO purposes - help!
> 
> Cameron G wrote:
> > Ok Jamie, I think I'm on the right track with this one now. 
> I slapped 
> > your ActionMap in to my config unedited, and the error log returned 
> > "Bad data selector='dept' field='name' key='(my search 
> term)'", which 
> > is good, because I'm pretty sure that means it was looking for a 
> > "dept" table in my db, which I don't have. So anyway, I 
> whittled your 
> > code down to the barest of functionality that I actually require, 
> > which is for it to take a single keyword and pass it to 
> results.html. Here's the actionmap I've got so far...
> > 
> > ActionMap  test  <<EOR
> > sub {
> >    my $product = shift;
> >    $CGI->{mv_coordinate} = 'yes';
> >    $CGI->{mv_search_file} = 'products';
> >    $CGI->{mv_search_page} = 'results.html';
> >    $CGI->{mv_searchtype} = 'db';
> >    $CGI->{mv_todo} ='search';
> >    $CGI->{mv_return_fields} =
> > 'sku,prod_group,category,image,description,contains,price';
> >    $CGI->{mv_sort_field} = 'category,price,description';
> >    $CGI->{mv_sort_option} = 'f,f,n,f';
> >    $CGI->{mv_search_field} = "category";
> >    $CGI->{mv_searchspec} = "$product";
> >    $Tag->update('process');
> >    return 1;
> > }
> > EOR
> > 
> > 
> > Now, as far as I can gather, that is basically what I want, except, 
> > well, it doesn't work. I'm calling it with 
> http://www.store.com/test/product.html.
> > Nothing in the error log, and the debug log is just showing 
> an attempt 
> > to retrieve a "select * from products" - which atleast proves it's 
> > *half* working. I understand that I may have to strip the .html off 
> > the end of the string passed through, but that's ok. Can anyone see 
> > what I might have done wrong here? I'm by no means an IC 
> expert, but 
> > I've kludged a few things in the past, and right now I 
> *feel* like I'm 
> > close, but I could still be a million miles away...
> 
> Maybe too much whittling? Try adding:
> 
> $CGI->{mv_column_op} = "rm";
> 
> Change:
> ...
> my $product = shift;
> ...
> $CGI->{mv_sort_option} = 'f,f,n,f';
> ...
> 
> to:
> ...
> my ($action, $product) = split ('/', shift); ...
> $CGI->{mv_sort_option} = 'f,n,f';
> ...
> 
> See if that helps.
> 

No luck :/ still getting my missing page error log entry (because I've
deleted the special_pages/missing file, it just logs instead) and the debug
log is still showing a "select * from products"... 



More information about the interchange-users mailing list