Welcome Guest, Not a member yet? Register   Sign In
URL problem
#1

[eluser]drcrazy4[/eluser]
Hey everybody. I've been using CodeIgniter for a few weeks and I've just decided to use it for a social network I am working on. The only problem is that I want the URL for profiles to be http://www.site.com/profile.php?id=987. From what I can see in the config.php file CodeIgniter isn't going to let me do this as far as I am aware. Is there a way to get around this?
#2

[eluser]jbowman[/eluser]
why not use http://www.site.com/profile/id/987
#3

[eluser]drcrazy4[/eluser]
Because it's a social network and that's not a very user friendly URL for profile pages.
#4

[eluser]Michael Wales[/eluser]
I'm not sure your original solution is very user friendly either. What's wrong with good old domain.com/username?
#5

[eluser]drcrazy4[/eluser]
That's not easy to do either. I don't like it like that anyways because you can't change your username then.
#6

[eluser]Craig A Rodway[/eluser]
What about

www.example.com/profile/123
www.example.com/123

URLs are better than query strings - why on earth would you want use them other than non-technical reasons? There is nothing non-user-friendly about those clean URLs.
#7

[eluser]avinashv[/eluser]
Cruft-free URLs are universally considered to be more user friendly than query strings. And I don't see why you can't change the username, unless you want people's links to remain the same.
#8

[eluser]Chris Newton[/eluser]
If you really like query strings, you can enable them in the config




Theme © iAndrew 2016 - Forum software by © MyBB