Welcome Guest, Not a member yet? Register   Sign In
Problem - The page you requested was not found.
#1

[eluser]maderic_m[/eluser]
I have the controller "Image" that generates thumbnails on the fly according to the parameters passed, for example:

http://localhost/site/index.php/image/48...f77b4b.jpg

If I call http://localhost/site/index.php/image/ works fine, but with all parameters throws me the error:


404 Page Not Found

The page you requested was not found.

What is the problem? Thanks
#2

[eluser]maderic_m[/eluser]
I solved it by putting in config/routes.php

$route['image/(:any)'] = "image/index/(:any)";

But I do not understand that I was not the other way.
#3

[eluser]WanWizard[/eluser]
Quite obvious. In a URL, the first segment MUST be the controller, the second MUST be the method. If you want to deviate from that, you need routing rules.

With a URL like http://localhost/site/index.php/image/48...f77b4b.jpg, CI tried to call the method 480() in the controller image. Which as you have discovered is not going to work.

You solved it the way it should.
#4

[eluser]maderic_m[/eluser]
you're right, thanks for taking the time for response




Theme © iAndrew 2016 - Forum software by © MyBB