Welcome Guest, Not a member yet? Register   Sign In
Divide URI segment into 2 parts through routes.php
#11

[eluser]louisl[/eluser]
Just maniplulate the string of segment 1 or $method, assuming you know the char length of aaa- which is 4 you could do echo substr($method, 4); or echo substr($this->uri->segment(1), 4);
#12

[eluser]danishravian[/eluser]
yes, that is what a possible solution could be. But I think CI should break into parts.

#13

[eluser]louisl[/eluser]
But you're doing something non standard so you've got to make it up, seo friendly uri segments are usually split by slashes and CI does do this.
#14

[eluser]Aken[/eluser]
You can use regular expressions in route rules, for more advanced rules.

Also, look into the rsegment() and similar methods in the URI Library, as they allow you to access segments of the rerouted URL instead of the one displayed in the browser.
#15

[eluser]danishravian[/eluser]
Thanks everyone for the help. I have done it with splitting the first parameter into two parts Smile




Theme © iAndrew 2016 - Forum software by © MyBB