Welcome Guest, Not a member yet? Register   Sign In
URL doesn't seem to work ?
#1

[eluser]Rushino[/eluser]
Hello,

I have a controller named frontend, i modified the config to set this as default controller..

I have a function named login() and the URL domain.com/index.php/login doesn't work it show a message saying :

404 Page Not Found

The page you requested was not found.

The domain.com work through.. it show the index.. any ideas ?

Thanks.
#2

[eluser]vikascoollives[/eluser]
it seems like your default controller's path is not properly set.
#3

[eluser]Rushino[/eluser]
Could you give a short explanation ?
#4

[eluser]danmontgomery[/eluser]
the default controller is only called when you don't specify one. In the url you have, you're looking for the login controller. http://domain.com/index.php would correctly load the frontend controller.

If you want to remove the controller from the url but still specify a method, you need to use routes.
#5

[eluser]Rushino[/eluser]
Well actually i was looking to execute the login method of the default controller. How do i proceed ?
#6

[eluser]danmontgomery[/eluser]
either domain.com/frontend/login or set up a route:

Code:
$route['login'] = 'frontend/login';
#7

[eluser]Rushino[/eluser]
Nice i got it to work thanks ! Would like to know where this code :

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

Have to be added in order to not use the index.php in the url ?

When i enter the url .. http://localhost/cigestion/login/

i get this ..

Not Found

The requested URL /index.php/login/ was not found on this server.
#8

[eluser]Rushino[/eluser]
Thanks, i figured out the rest.




Theme © iAndrew 2016 - Forum software by © MyBB