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

[eluser]ehicks727[/eluser]
[quote author="BrianDHall" date="1257194434"]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);[/quote]

Thank you for replying.. I'm going to give it a shot and I'll let you know.


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, 10:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB