Welcome Guest, Not a member yet? Register   Sign In
[Solved] Routing issue - need to redirect from url parameterized pages to new CodeIgniter nice urls
#4

[eluser]BrianDHall[/eluser]
If you enable query strings in CI (in config.php), and probably set your uri_protocol to PATH_INFO in config.php.

Then if you have a debugger you can just set a breakpoint in routes.php and you can see that $_GET still exists for your use.

Then you can just do this in your routes file:

Code:
if ($_GET['id'])
{
    $route['(:any)'] = 'reroute/story/' . $_GET['id'];
}

I tested it on my localhost and it works perfectly. If a ? and somewhere an id= exists, it will trigger the route and away it will go.

If it gives you problems I like testing my reroutes against a page (function) that has nothing but $this->output->enable_profiler(TRUE);


Messages In This Thread
[Solved] Routing issue - need to redirect from url parameterized pages to new CodeIgniter nice urls - by El Forum - 11-02-2009, 08:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB