github url style

Posted by Alex Le on Stack Overflow See other posts from Stack Overflow or by Alex Le
Published on 2010-06-03T18:28:45Z Indexed on 2010/06/03 18:34 UTC
Read the original article Hit count: 373

Filed under:
|
|
|

Hi all,

I wanted to have users within my website to have their own URL like http://mysite.com/username (similar to GitHub, e.g. my account is http:// github. com/sr3d). This would help with SEO since every profile is under the same domain, as apposed to the sub-domain approach.

My site is running on Rails and Nginx/Passenger. Currently I have a solution using a bunch of rewrite in the nginx.conf file, and hard-coded controller names (with namespace support as well). I can share include the nginx.conf here if you guys want to take a look.

I wanted to know if there's a better way of making the URL pretty like that.

(If you suggest a better place to post this question then please let me know)

Cheers,

Alex

© Stack Overflow or respective owner

Related posts about nginx

Related posts about github