Welcome Guest, Not a member yet? Register   Sign In
[Solved] Extracting Routes with Hard-Coded URL
#5

[eluser]Madalina.C[/eluser]
Well FYI I solved it:

Code:
public function parseURL($url){
        //make things easier, trick the server with our passed-in URL
        $_SERVER['PATH_INFO'] = $url;
        $_SERVER['QUERY_STRING'] = $url;
        
        //set the URL as we want it
        $this->uri->uri_string = $url;
        
        // Compile the segments into an array
        $this->uri->_explode_segments();

        //the first few items in array are redundant info. Rather than writing code to parse it out
        //just manually cut it out
        $this->uri->segments = array_splice($this->uri->segments, 4, count($this->uri->segments));
        
        //let the segments and rsegments be parsed
        $this->router->_parse_routes();    
    }


Messages In This Thread
[Solved] Extracting Routes with Hard-Coded URL - by El Forum - 08-16-2010, 03:43 PM
[Solved] Extracting Routes with Hard-Coded URL - by El Forum - 08-16-2010, 05:38 PM
[Solved] Extracting Routes with Hard-Coded URL - by El Forum - 08-17-2010, 07:52 AM
[Solved] Extracting Routes with Hard-Coded URL - by El Forum - 08-17-2010, 11:31 AM
[Solved] Extracting Routes with Hard-Coded URL - by El Forum - 08-20-2010, 02:05 PM



Theme © iAndrew 2016 - Forum software by © MyBB