Welcome Guest, Not a member yet? Register   Sign In
Help w/ URI Routing - Skip class & function calls
#1

[eluser]Wyndsang[/eluser]
Hello!

I started using CI a couple of days ago, and it has been a really effective tool so far.
Yet, there is one teensy problem I'm facing.

I have a very simple page, and a very simple controller called Page.

Page has a function, get_page_by_reference($reference), which fetches mysql data based on a supplied variable, and then constructs a webpage by that data.

Page is set as default controller.

Now, normally, I assume I would supply $reference like this:

Code:
example.com/index.php/page/fetch_page_by_reference/reference
However, I would like to be able to just supply:

Code:
example.com/index.php/reference
or
example.com/reference

Is this possible with $route['']?

Also, it would be great if this was only true when there is only one segment following index.php.


Messages In This Thread
Help w/ URI Routing - Skip class & function calls - by El Forum - 07-25-2011, 04:02 AM
Help w/ URI Routing - Skip class & function calls - by El Forum - 07-25-2011, 04:50 AM
Help w/ URI Routing - Skip class & function calls - by El Forum - 07-25-2011, 05:42 AM
Help w/ URI Routing - Skip class & function calls - by El Forum - 07-25-2011, 07:06 AM
Help w/ URI Routing - Skip class & function calls - by El Forum - 07-25-2011, 08:22 AM
Help w/ URI Routing - Skip class & function calls - by El Forum - 07-25-2011, 09:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB