Welcome Guest, Not a member yet? Register   Sign In
Rewrite url or use routing
#1

[eluser]0v3rth3d4wn[/eluser]
Hi! In my application I have the following url: http://mysite.com/bg/category/index/2/12 where category is my controller, index is the method and 2 and 12 are the parameters. 2 is the category id and 12 is the subcategory id. How can I get rid of the index (I tried with routing but no luck) and how can I replace or add the name of the category and the subcategory depending on the id which is the id in the database. I want to achieve something like http://mysite.com/bg/category/clothing/shirts . I'm not sure what I have to use - routing or some .htaccess magic... Thanks.


Messages In This Thread
Rewrite url or use routing - by El Forum - 03-02-2012, 03:12 PM
Rewrite url or use routing - by El Forum - 03-02-2012, 03:29 PM
Rewrite url or use routing - by El Forum - 03-02-2012, 03:38 PM
Rewrite url or use routing - by El Forum - 03-02-2012, 04:03 PM
Rewrite url or use routing - by El Forum - 03-02-2012, 04:18 PM
Rewrite url or use routing - by El Forum - 03-02-2012, 06:13 PM
Rewrite url or use routing - by El Forum - 03-03-2012, 01:22 AM
Rewrite url or use routing - by El Forum - 03-03-2012, 08:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB