Appache rewrite rules in htaccess file
I am working in a project where we use codeigniter.
If user goto http://www.mysite.com/products.html link then my router look like is
$route['product'] = "product/all_product";
If they click any category say computer the (s)he will redirect to http://www.mysite.com/computer.html and my router is
$route['category/(:any)'] = "product/category_product/$1"; //$1 = computer or electronics
How to do that using .htaccess file?
@SKG - the url for your codeigniter site will be mysite.com/index.php. You can (and most people do) remove the index.php, so the default url is simply mysite.com
from there, if you have a controller Category with an index($var) function, you can access it via: mysite.com/category/(var)
if you have an existing page at mysite.com/computer.html and you would like it to go to mysite.com/category/(:any) - perhaps because that link is already "out in the wild" in many places and so you want to redirect people to the new url, then you'll want to do the redirect where the computer.html file is and then remap, as shown here: