Welcome Guest, Not a member yet? Register   Sign In
Linking to my site with a ?var=val style url (Solved)
#10

[eluser]patwork[/eluser]
And here's my solution. Note that everything from first '&' to end of the uri is removed.

Code:
class MY_URI extends CI_URI
{

    function _fetch_uri_string()
    {
        parent::_fetch_uri_string();
        $pos = strpos($this->uri_string, '&');
        if ($pos !== FALSE)
        {
            log_message('debug', 'Removing invalid URI args from '.$this->uri_string);
            $this->uri_string = ($pos == 0 ? '' : substr($this->uri_string, 0, $pos));
            if ($this->uri_string == '/')
            {
                $this->uri_string = '';
            }
        }
    }

}


Messages In This Thread
Linking to my site with a ?var=val style url (Solved) - by El Forum - 09-16-2009, 10:08 AM
Linking to my site with a ?var=val style url (Solved) - by El Forum - 09-16-2009, 10:30 AM
Linking to my site with a ?var=val style url (Solved) - by El Forum - 09-16-2009, 10:39 AM
Linking to my site with a ?var=val style url (Solved) - by El Forum - 09-16-2009, 10:41 AM
Linking to my site with a ?var=val style url (Solved) - by El Forum - 09-16-2009, 10:59 AM
Linking to my site with a ?var=val style url (Solved) - by El Forum - 09-16-2009, 11:05 AM
Linking to my site with a ?var=val style url (Solved) - by El Forum - 09-16-2009, 11:56 AM
Linking to my site with a ?var=val style url (Solved) - by El Forum - 09-16-2009, 12:31 PM
Linking to my site with a ?var=val style url (Solved) - by El Forum - 09-16-2009, 01:09 PM
Linking to my site with a ?var=val style url (Solved) - by El Forum - 09-23-2010, 05:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB