Welcome Guest, Not a member yet? Register   Sign In
controller/index/arg ==> controller/arg?
#1

[eluser]err403_love[/eluser]
Is there any way (without routing every URL) to allow CI to default to "controller/argument" if the index() function contains arguments? I don't want to have to set this for every controller in the routes (if you can even change this in routes, that is) and I would find this very useful.

Having to use a URL like controller/index/parameter just doesn't make sense.

I'm not sure if this is really possible though. If I configured it through routes, it would also try to reroute subdirectories, and I can't have that. I just really wish the URL would be "smart" and figure out that if that URI segment is NOT another function in your controller, and it is NOT a subdirectory, to treat it as an argument of the index() function, if it requires arguments, of course.

Thanks.


Messages In This Thread
controller/index/arg ==> controller/arg? - by El Forum - 05-16-2008, 03:01 AM
controller/index/arg ==> controller/arg? - by El Forum - 05-16-2008, 03:07 AM
controller/index/arg ==> controller/arg? - by El Forum - 05-16-2008, 03:46 AM
controller/index/arg ==> controller/arg? - by El Forum - 05-16-2008, 04:26 AM
controller/index/arg ==> controller/arg? - by El Forum - 10-08-2008, 04:07 PM
controller/index/arg ==> controller/arg? - by El Forum - 10-08-2008, 04:21 PM
controller/index/arg ==> controller/arg? - by El Forum - 10-08-2008, 06:10 PM
controller/index/arg ==> controller/arg? - by El Forum - 10-09-2008, 12:50 AM
controller/index/arg ==> controller/arg? - by El Forum - 10-09-2008, 01:16 AM
controller/index/arg ==> controller/arg? - by El Forum - 10-09-2008, 01:21 AM
controller/index/arg ==> controller/arg? - by El Forum - 10-09-2008, 01:22 AM
controller/index/arg ==> controller/arg? - by El Forum - 10-09-2008, 01:30 AM
controller/index/arg ==> controller/arg? - by El Forum - 10-09-2008, 02:25 AM
controller/index/arg ==> controller/arg? - by El Forum - 10-09-2008, 07:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB