redirect function is an internal way of
redirecting urls within the framework. Urls are redirected to pages based on the project root
folder. For example, if the project folder is app, the redirect
function begins its redirection in the project root. This means that the app
is not included as part of the url supplied.
redirect('/'); // redirect to accessible site root
redirect('index'); // redirect to index url