【发布时间】:2016-07-25 21:53:15
【问题描述】:
我正在使用UserFrosting 构建我的网站,想知道我是否能够从登录和注册页面的 url 中删除 /account/?
【问题讨论】:
-
欢迎来到 Stack Overflow!我尽可能地编辑了你的问题。但是,添加代码和描述,以便更多具有该主题知识的人看到它。请在您遇到的特定错误消息中进行编辑,以防有必要识别特定问题。祝你好运!
标签: userfrosting
我正在使用UserFrosting 构建我的网站,想知道我是否能够从登录和注册页面的 url 中删除 /account/?
【问题讨论】:
标签: userfrosting
每个路由的 URL 都在 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 的链接和引用。
【讨论】: