• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Auto redirect to root folder

#1
Exclamation 
When I connect on below link, website will auto redirect to new url:

Code:
http://localhost:8888/ci4/public/admin
redirect to http://localhost:8888/admin

http://localhost:8888/ci4/public/admin/
redirect to http://localhost:8888/admin

http://localhost:8888/ci4/public/admin/auth/
redirect to http://localhost:8888/admin/auth


But when I connect to "http://localhost:8888/ci4/public/admin.html", and routes realized that i connect to V_admin Controllers, and website has print contents of admin page.
I think the issue here is when i connect a folders not exists, website will auto redirect to root folder. On my source code, I set V_admin for admin controllers.
My Routes:


Code:
$routes->group('/admin', function($routes)
{
    //    Authentication
    $routes->add('auth.html', 'VAdmin\Controllers\Auth::index');
    $routes->add('auth/(:alpha).html', 'VAdmin\Controllers\Auth::index/$1');
    
    $routes->add('blog',  'Admin\Blog::index');
});
$routes->add('/admin', 'VAdmin\V_admin::index');


I don't know how to fix it or find any problems with my localhost. I used MAMP Pro on Mac Sierra. And CI3 run very well.
I asked on Github but I closed it after i read rules, so I post here, please help.
https://github.com/bcit-ci/CodeIgniter4/issues/703
Reply


Messages In This Thread
Auto redirect to root folder - by malayvuong - 09-03-2017, 08:48 AM
RE: Auto redirect to root folder - by InsiteFX - 09-03-2017, 09:17 AM
RE: Auto redirect to root folder - by malayvuong - 09-03-2017, 09:19 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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