Welcome Guest, Not a member yet? Register   Sign In
Routing and anchor issues
#1

[eluser]The Revel[/eluser]
Ok, I have a page at auth/terms_of_use I want it to route simply to terms_of_use.

First questions,

do I use:
Code:
$route['auth/terms_of_use'] = 'terms_of_use' ;
or
Code:
$route['terms_of_use'] = 'auth/terms_of_use' ;
?

Second Questions, How do I use the anchor() function to got to the new url?

I tried both ways and I get the 404 message.

Also note I am using the Internationaliaztion plugin that automatically puts domain.com/en/ or domina.com/fr/ in front of it.
#2

[eluser]CroNiX[/eluser]
It's $route[what-the-url-will-be] = the_controller/method it routes to, so your 2nd one (although you might make it terms-of-use).
For the anchors, it's what-the-url-will-be, like anchor('what-the-url-will-be', 'My Link');, which will trigger the route when they go to it.
Haven't used i18n, so don't know about that one, sorry.
#3

[eluser]The Revel[/eluser]
Thank you, I found a way for it to work properly with i18n
Code:
$route['^(en|fr)/terms-of-use'] = 'auth/terms_of_use' ;




Theme © iAndrew 2016 - Forum software by © MyBB