我正在使用UserFrosting构建我的网站,并想知道我是否能够从登录和注册页面的网址中删除/ account /?
答案 0 :(得分:1)
每条路线的网址都在public/index.php
中定义。所以,你想把它们分开:
$app->get('/login/?', function () use ($app) {
// Forward to installation if not complete
if (!isset($app->site->install_status) || $app->site->install_status == "pending"){
$app->redirect($app->urlFor('uri_install'));
}
$controller = new UF\AccountController($app);
return $controller->pageLogin();
});
$app->get('/register/?', function () use ($app) {
// Forward to installation if not complete
if (!isset($app->site->install_status) || $app->site->install_status == "pending"){
$app->redirect($app->urlFor('uri_install'));
}
$controller = new UF\AccountController($app);
return $controller->pageRegister();
});
您还需要在客户端代码(Javascript)中对/account/register
和/account/login
的链接和引用进行查找和替换。