Masking either class/method in URI for shorter, more SEF URLs

Hi. Im building a little store site and am looking to make the urls as short and search engine friendly as possible.

I've hidden the index.php file, but am hoping to make the url even shorter by masking either the class or method.

Currently things look like this: in:

I'd like to get things to look this:

where category is a class and the next segment is an id, not a method.

Is this possible?

Alternately, can I run the site off of one class and then mask it in the uri?

Thanks for your help.

[eluser]Michael Wales[/eluser]
In routes.php:

$route['category/(\d+)'] = 'category/details/$1';

Required reading

Thank you.

Kindly need a more modified solution

You have given a way for SE url's

In routes.php:

$route['category/(\d+)'] = 'category/details/$1';

But what if , there are two variables i-e $1 & $2 and the required url should only have $2 in preceding.

For example : Got a url " site-name/directory/list/$1/$2 "
should be : "site-name/list/$2"

I have added in route.php

$route['list/$2']="directory/list/$1/$2"; nothing effected.
and only adding routing variable like above ,will generate the result or do I have to add same rule to htaccess file?

Thank you.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.