Welcome Guest, Not a member yet? Register   Sign In
Ezauth and URLs
#1

[eluser]atomless[/eluser]
Hi,

I've been using EzAuth in my current CI project and it's great.
I have built my test application with a single controller, meaning that the login, register, change password etc are all methods of my one controller.

All works well but means that my urls (with the mod_rewrite removing the index.php bit) will take the form http://{my domain}/{my main controller}/{methods of my controller}
Is there a way that I can change the urls to :
http://{my domain}/{methods of my controller}
Or would I have to build it with separate controllers for each of the methods, login, register etc?
If that is the case I guess I would need to keep reloading EzAuth in the constructer of each controller - would that work ok?
Or is there a better way to structure things?

Thanks in advance,

James
#2

[eluser]Tom Schlick[/eluser]
you could use a redirect in mod_rewrite that changes it into the full thing from just the controller.
#3

[eluser]atomless[/eluser]
I'm a real newbie to mod_rewrite so don't really know how I would achieve that and was hoping there would be some CI method to achieve such a thing?
#4

[eluser]atomless[/eluser]
this is what I should have read before posting this question :
http://ellislab.com/codeigniter/user-gui...uting.html
#5

[eluser]danoph[/eluser]
Right now, I am loading EzAuth in each controller in my projects. In the remap function however, I am redirecting users that need to login to the controller with the login function.




Theme © iAndrew 2016 - Forum software by © MyBB