diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 2e2eaeb..547e913 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -18,6 +18,7 @@ $routes->get('/', 'Main::index'); // Login routes $routes->match(['get', 'post'], 'login', 'Login::index'); +$routes->match(['get', 'post'], 'login/', 'Login::index'); $routes->get('login/logout', 'Login::logout'); $routes->get('login/showVerify2fa', 'Login::showVerify2fa'); $routes->post('login/verify2fa', 'Login::verify2fa'); diff --git a/public/.htaccess b/public/.htaccess index cbec4d6..cc3702d 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -14,7 +14,8 @@ Options All -Indexes # http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritebase # RewriteBase / - # Redirect Trailing Slashes... + # Redirect Trailing Slashes (only for GET requests to preserve POST data) + RewriteCond %{REQUEST_METHOD} GET RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} (.+)/$ RewriteRule ^ %1 [L,R=301]