Mutley Posted April 10, 2009 Share Posted April 10, 2009 I have a list of categories, that are like: <a href="list.php?cat=2">Ice Cream</a> I figure, that refering to an ID column, is more efficent and suitable than using the category name (for queries). So if I did a mod_rewrite, it would look like: mydomain.com/categories/2 However, what I would like it to do is: mydomain.com/categories/Ice_Cream Now I figured that I can't do this because I would lose the ID reference? Any soloution to this? And how would I auto include a underscore to replace spaces? Thanks in advance, Nick. Quote Link to comment Share on other sites More sharing options...
Helmet Posted April 10, 2009 Share Posted April 10, 2009 Use <a href="list.php?cat=ice_cream">Ice Cream</a> and build a php function to get the category id from the cat value Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.