I'm having some troubles with the .htaccess and SEO URL (aka URL rewrite). For instance I have a list of categories like (extracted from the database) :
id name 1 category template 2 category-template 3 category template 4 category-template
I have some duplicate names, and judging by the lowercase and replacing spaces with "-" in the url I have all the fields from the database resulting in the same format (lowercase and replace " " with "-").
My actual .htaccess file looks like this:
Options +FollowSymlinks RewriteEngine on RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?page=$1
Is there some way that I can generate a url like
www.website.com/category-template and by clicking on that the next script will get through
$_POST variable the id from the database (for instance: 3)? I have 4 "identical" rewrites but each with a distinct id in the database and I want to retrieve the id of the correct one.
LE: I want to keep the URL very clean, like
www.website.com/category-template, although there is a simpler way of doing it by inserting the id like: