Welcome Guest, Not a member yet? Register   Sign In
Missing URI Segment Check

Hello fellow CodeIgniters,

I'm just picking up CodeIgniter once again after a few years out from programming.

I'm currently using the following URL

http://[local domain]/welcome/index/http/404

and pulling my following values
$this->uri->segment(3); = http
$this->uri->segment(4); = 404

However if I remove http and end up with the following url: http://[local domain]/welcome/index/http/404
I want to still be able to pick up the same values ie (
$this->uri->segment(3); = (NULL/FALSE or what ever)
$this->uri->segment(4); = 404

Same applies if I miss segment 4 but have segment 3 filled out (
$this->uri->segment(3); = http
$this->uri->segment(4); = (NULL/FALSE or what ever)

Catch my drift? What is the best way to do this?



Theme © iAndrew 2016 - Forum software by © MyBB