Pretty root urls |
[eluser]Unknown[/eluser]
Hi there! I'm pretty new to CodeIgniter and i'm trying to make my first CMS on it. So, let's get to the point: I have table named "static_pages" that contains id, url, body. So the idea is to make my main pages looks like: http://example.com/url. So for me the tricky part is to make my function in the Static Controller, which is set to "default_controller", called view to do this. Is this possible, or i should use mod_rewrite to rewrite example.com/view/url to example.com/url? If i do it with mod_rewrite i think that there will be some problems with the other Controllers, or i'm wrong? Sorry for my bad English, i'm still learning it. Thanks in advance!
[eluser]Unknown[/eluser]
Ok, i'm tryin' with this one: $route[':any'] = "static_page/view/$1"; But the other controllers are not working.... Any ideas? P.S. Also $route['(.*)'] = "static_page/view/$1"; is not working fine for me. |
Welcome Guest, Not a member yet? Register Sign In |