2016-07-25 61 views
1

我使用UserFrosting来构建我的网站,并想知道我是否能够从登录网址和注册页面中删除/ account /?Userfrosting删除/帐户/在url中

+0

欢迎来到Stack Overflow!我尽可能地猜测你的问题,然后编辑你的问题。但是,添加代码和说明以便更多知道该主题的人员将看到它。如果需要识别特定问题,请编辑您遇到的特定错误消息。祝你好运! – manetsus

回答

1

每个路由的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

+0

非常感谢您的回复,帮助我! – alex141097

+0

没问题 - 一定要upvote并接受我的答案! – alexw