[ic] Mod_rewrite & mod_interchange & short urls
David Bordas
bordas at testadaz.com
Fri Apr 20 07:00:59 EDT 2007
Peter a écrit :
> On 04/20/2007 02:55 AM, Peter wrote:
>
>> I use an actionmap for that. Something like this should work for you:
>>
>> ActionMap categorie <<EOA
>> sub {
>> # Grab only the second val in path.
>> my $cat = (split(m:/:, shift, 3))[1];
>> # chop off the .html if applicable.
>> $cat =~ s/.html$//i;
>>
>> my %scan = (
>> st => 'db',
>> co => 'yes',
>> sf => 'prod_group',
>> se => $cat,
>> tf => 'category',
>> va => "categorie=$cat\0ss_categorie=",
>> );
>>
>> @{$CGI}{keys %scan} = values %scan;
>> $CGI->{mv_todo} = 'search';
>> $Tag->update('process');
>> $CGI->{mv_nextpage} = $Config->{Special}->{results};
>> return 1;
>> }
>> EOA
>>
>
> Forgot to mention, you can find more info about ActionMap at
> <http://www.interchange.rtfm.info/icdocs/config/ActionMap.html>.
>
> Peter
>
This sounds great ! I'll have a look to this soon.
Thank you peter.
--
David Bordas / Testadaz.com
---------------------------------------------------------------------
http://www.testadaz.com : commandez les produits du terroir auvergnat
http://www.testadaz.com/blog : Le blog du terroir cantalien
---------------------------------------------------------------------
More information about the interchange-users
mailing list