• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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?
Practical CodeIgniter 3  • CodeIgniter 4 Foundations - Coming Soon • Vulcan - CLI Tools for CI4
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
Practical CodeIgniter 3  • CodeIgniter 4 Foundations - Coming Soon • Vulcan - CLI Tools for CI4
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 the CodeIgniter Community in 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.
Practical CodeIgniter 3  • CodeIgniter 4 Foundations - Coming Soon • Vulcan - CLI Tools for CI4
Reply

#8
(03-01-2017, 12:51 PM)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 the CodeIgniter Community in 2009.          ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.