Catch n check $this->uri->segment(?) |
[eluser]Circuitbomb[/eluser]
Ok so maybe my title was a bit confusing. Using the default controller set in CodeIgniter I'm looking to catch a url similar to http://mysite.com/index.php/4348q34 using code that looks like: Code: if($this->uri->segment(1) === TRUE) { in the construct of the default controller. my_library is being loaded. Basically, what im trying to do is check to see if the uri segment 1 or 2 exists within the default controller, and if it doesnt to process a method in my library to initialize a redirect to an external site. any ideas?
[eluser]Circuitbomb[/eluser]
Ok I managed to hack it up looking at http://ellislab.com/forums/viewthread/103349/P30/ and sending the request to a function that looks like Code: function process($string) { It looks good so far, except I don't get the 404's from no match uri's in which case i can simply direct it in else. |
Welcome Guest, Not a member yet? Register Sign In |