CodeIgniter Forums
URI Routes Issue - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: URI Routes Issue (/showthread.php?tid=15367)



URI Routes Issue - El Forum - 02-02-2009

[eluser]JCianflone[/eluser]
Hi Everyone,
I am using routes in my website to push everything to a single controller like this:

http://127.0.0.1/test/test1

Code:
$routes['(:any)/(:any)'] = "website/$1_$2";

This works perfectly fine so its great, but there seems to be one slight problem if you do this:

http://127.0.0.1/test/test1#

you get redirected to my 404 page. That does make sense, because I don't have a function with a hash in it. On a normal (non-routed) page, the # would just refresh the current page, you wouldn't have Apache or anything trying to redirect the page.

Anyone see this before or have a workaround?

Thanks!