Welcome Guest, Not a member yet? Register   Sign In
Rootes bug?
#1

I have blank app from distribution
I add the second route to Config/Routes.php

$routes->add('/', 'Home::index');   // from distrib
$routes->add('/test', 'Home::index'); // addition

I get 200 OK for 
http://local.dev/
And 404 fof
http://local.dev/test

Why? Sad
Reply
#2

Try the second one without the forward slash and tell me if it's working?
Reply
#3

Thank you so much!
All right.

For many years I have not programmed in php.
But now it was necessary. And I'm really looking forward to CI4
Reply
#4

So that's working? That shouldn't be a requirement, honestly, so it looks like that needs to be marked as a bug. Smile
Reply
#5

Without a slash at the beginning all right.
$routes->add('/test', 'Home::index'); // 400 OK
$routes->add('test', 'Home::index'); // 200 OK
I do not know whether this is a mistake. But it is illogical IMHO
Reply
#6

@kilishan, I thought that the / slash meant that it was the root directory and that sub-directories did not require it?
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#7

@insite - well, we're dealing with URI's at this point, not directories, though they do match up. The point is that it should work with or without the leading slash and it's currently not.
Reply
#8

(03-01-2017, 11:51 AM)kilishan Wrote: @insite - well, we're dealing with URI's at this point, not directories, though they do match up. The point is that it should work with or without the leading slash and it's currently not.

OK, thanks for the clarification.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB