Need to have either example.com/username or username.example.com, but how?

Posted by Stefan on Stack Overflow See other posts from Stack Overflow or by Stefan
Published on 2010-05-01T22:04:07Z Indexed on 2010/05/01 22:27 UTC
Read the original article Hit count: 484

Filed under:
|
|

Hey guys,

I'm almost finished developing my large project, however I would love it if I could make it so instead of having the users profile pages at: http://example.com/profile/username/USERNAME

(i'm currently using .htaccess to rewrite the GET data into forward slashes and profile(.php) being read as just 'profile' profile.php also parses the url correctly to retrieve the GET data)

But it would be some much better if I could do it so that it's like http://www.example.com/USERNAME (preferred) or http://www.USERNAME.example.com

Any ideas or resources?

Thanks, Stefan

© Stack Overflow or respective owner

Related posts about url

Related posts about url-rewriting