I am using UserFrosting to build my website, and wondered if i was able to remove the /account/ from the url of the login and sign up page?
Asked
Active
Viewed 94 times
1
-
Welcome to Stack Overflow! I edited your question as far as I could guess your problem. However, add code and description so that more people with knowledge of the subject will see it. Please edit in the specific error-message you're encountering in case that's necessary to identify the specific problem. Good Luck! – Enamul Hassan Jul 26 '16 at 02:29
1 Answers
1
The URLs for each route are defined in public/index.php
. So, you would want to separate them out there:
$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();
});
You'll also need to do a find-and-replace for links and references to /account/register
and /account/login
in the client-side code (Javascript).

alexw
- 8,468
- 6
- 54
- 86