Welcome Guest, Not a member yet? Register   Sign In
Myth:auth routes for a sub-folder / path offset app?
#1
Sad 

Have CI 4 and myth:auth both installed under a /manage sub-folder and path, along with an app for user management that works fine without authentication.
myth's register and login pages appear normal at /manage/register and /manage/login respectively, however the form POST targets are e.g. /register which of course produces a 404.
myth's src/Views/register.php:14 has:

       <form action="<?= route_to('register') ?>" method="post">
which indicates the route isn't taking account of the baseURL offset in .env:
       app.baseURL = 'https://site.domain.com/manage/'
Modifying the myth Routes.php, by inserting a path token 'manage' loses the /register form page completely, so that's not sufficient.
      $routes->group('manage', ['namespace' => 'Myth\Auth\Controllers'], function ($routes) {
I suspect this is a relatively simple issue to fix, but I'm largely ignorant of CodeIgniter's architecture and route handling.
Documentation doesn't provide much detail for patterns like this, only hints that it is possible.
What should I try next?
Reply


Messages In This Thread
Myth:auth routes for a sub-folder / path offset app? - by stonebreaker - 08-13-2021, 05:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB