[eluser]sihijau[/eluser]
Hi, i'm newbie in CI..
I can rewrite url to remove index.php and adding suffix to it using mod_rewrite on .htaccess
this is content of my .htaccess file:
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /base_url
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
this rewrite rule make
Code:
base_url/index.php/stocks/bycategory/9
become
Code:
base_url/stocks/bycategory/9.html
but i want more advance, i want to replace ID become category name.
for example become like this
Code:
base_url/stocks/bycategory/pants.html
or
Code:
base_url/stocks/bycategory/shirts.html
etc
Could anyone help me to solve this problem...?