Welcome Guest, Not a member yet? Register   Sign In
Tank_Auth -- removing /auth from the URL
#1

[eluser]imcl[/eluser]
I am using Tank_Auth.

Is it possible to remove the /auth from URLs as follows:

Code:
http://www.example.com/auth/login

TO

http://www.example.com/login

I wonder if this can be done via htaccess or if I would need to change the Tank_Auth code to achieve this.

If it's not possible to completely remove via htaccess, an acceptable solution would be to change /auth for another string.

Thanks for you comments.
#2

[eluser]osci[/eluser]
in your config/routes.php add
Code:
$route['login'] = "auth/login";

look at User Guide - URI Routing
#3

[eluser]imcl[/eluser]
thanks osci -- but this seems to only partially resolve the problem -- when a function is called directly from the /auth controller, the routing does not work and /auth still appears.

for example the logout function redirects to /auth/login, despite the route setting, because that's hardcoded in the library.

however, if i type /login in the address bar, now i can actually see the login page because of the route.




Theme © iAndrew 2016 - Forum software by © MyBB