CodeIgniter Forums
Question about URI/URL's - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Question about URI/URL's (/thread-21653.html)



Question about URI/URL's - El Forum - 08-17-2009

[eluser]Rost[/eluser]
Hello,

I have a question about the URI Class and how you can use it.

The only way I could use it was like: www.domain.com/pages/page/1
But I want it like : www.domain.com/pages/1

Is this possible and if so, can you explain me how?


Regards RoSt


Question about URI/URL's - El Forum - 08-17-2009

[eluser]designfellow[/eluser]
Hi,
you can use uri routing to create custom redirections.
Add the below line to "config/routes.php"
$route['pages/(:any)']="pages/page/$1";
try this &post;back.
Happy Coding,
DesignFellow


Question about URI/URL's - El Forum - 08-17-2009

[eluser]Rost[/eluser]
Thank you it works.