Welcome Guest, Not a member yet? Register   Sign In
short url for username
#1

[eluser]Unknown[/eluser]
Hello, I'm newbie in this forum... :cheese:

I want to create a short url for username like www.somesite.com/username with codeigniter.
Is it possible to create that? Coz, all i know is CI will read the username as controller. I've try to change the routes.php, to read the username to re-reoute to selected controller. But that will let CI read all controller as username.
So what is the best solution? Sorry if this topic have been posted before, coz i'm just join this forum.

All of your help is very helping me. And sorry for my english.. %-P

Regards
#2

[eluser]BrianDHall[/eluser]
I recommend a forum search, lots of threads about all sorts of considerations.

The really short answer is - yes, it's totally possible. It's also kind of a pain in the ass to work with, as there is name conflict issues, growth issues (what if you create a new controller that just so happens to be someones username? and what if someone creates a username with the same name as one of your controllers). Much better is something like domain.com/user/username, at least from a developmental standpoint.

http://ellislab.com/forums/viewthread/126905/ for solutions of this sort.

Remember: just because you can, doesn't mean you should Wink
#3

[eluser]Unknown[/eluser]
Hey, i haven't think of that issue! You're right, if user register same as my controller name that would be another conflict. Alright, maybe i must change my mind to use that method and try to make another way. Even if i'm still curios with that.. %-P Thank for your help Brian.

Regards




Theme © iAndrew 2016 - Forum software by © MyBB