Guest upirate Posted March 31, 2007 Share Posted March 31, 2007 I'll keep it simple. I have a site with 3 navigation categories: Cameras - Minolta -Canon -Ay67 Series -Ay65 Series -Ay6y advanced All categories are stored in a DB and linked to each other SO if a user clicks on Ay6y advanced: I want the url to say "sitename.com/Cameras/Canon/Ay65_Series/Ay6y advanced I know this involves a possible rewrite rule. Im just not too good with them. Help will be appreciated. thankyou very much..and if I asked this at the wrong place..please forgive me. Link to comment https://forums.phpfreaks.com/topic/45067-dont-know-where-to-ask-this/ Share on other sites More sharing options...
shocker-z Posted March 31, 2007 Share Posted March 31, 2007 So are you wanting help with creating the menu to look like that from the data in the database? or are you just wanting to know how to use rewrite? Regards Liam Link to comment https://forums.phpfreaks.com/topic/45067-dont-know-where-to-ask-this/#findComment-218786 Share on other sites More sharing options...
Guest upirate Posted March 31, 2007 Share Posted March 31, 2007 I have the data in the database already each category has a unique id and has a parent. I guess I just need help with the rule so that if someone goes to sitename.com?id=7 well that takes them through the entire category system resulting in URL saying: sitename.com/category/sub_category/selected_category thanks for the reply man Link to comment https://forums.phpfreaks.com/topic/45067-dont-know-where-to-ask-this/#findComment-218792 Share on other sites More sharing options...
Barand Posted March 31, 2007 Share Posted March 31, 2007 Here's a helpful, constructive solution http://www.phpfreaks.com/forums/index.php/topic,120025.msg563216.html#msg563216 and one that may be little more help, with some minor adaptations http://www.phpfreaks.com/forums/index.php/topic,133632.msg563570.html#msg563570 Link to comment https://forums.phpfreaks.com/topic/45067-dont-know-where-to-ask-this/#findComment-218805 Share on other sites More sharing options...
Guest upirate Posted March 31, 2007 Share Posted March 31, 2007 I read your second solution and already have my database in that way. What I now want is a mod rewrite wolution to where when someone goes to"sitename.com?id=3" well it shows a friendly URL like sitename.com/cameras/something.html Link to comment https://forums.phpfreaks.com/topic/45067-dont-know-where-to-ask-this/#findComment-218868 Share on other sites More sharing options...
Barand Posted March 31, 2007 Share Posted March 31, 2007 I was thinking you could adapt the code to give category/sub_category/selected_category instead of category >> sub_category >> selected_category Link to comment https://forums.phpfreaks.com/topic/45067-dont-know-where-to-ask-this/#findComment-218870 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.