flash gordon Posted July 29, 2009 Share Posted July 29, 2009 Hello gang, does anyone know for certainity or know a good way that facebook and myspace are able to create urls like this myspace.com/{username}. I'm certain those aren't physical folders and it seems like WAY too much overhead for all of those 100s of millions of users to have mod_rewrite rules to be make those urls. So...I'm clueless to how they are actually doing it. Does anyone know? Cheers Link to comment https://forums.phpfreaks.com/topic/167926-architect-of-myspacefacebook-pretty-urls/ Share on other sites More sharing options...
corbin Posted July 29, 2009 Share Posted July 29, 2009 With 1 rewrite rule. Link to comment https://forums.phpfreaks.com/topic/167926-architect-of-myspacefacebook-pretty-urls/#findComment-886007 Share on other sites More sharing options...
flash gordon Posted July 29, 2009 Author Share Posted July 29, 2009 great? wanna explain? perhaps...if it's not a "known or reserved" /{folder_name} do the mod_write. Link to comment https://forums.phpfreaks.com/topic/167926-architect-of-myspacefacebook-pretty-urls/#findComment-886089 Share on other sites More sharing options...
corbin Posted July 29, 2009 Share Posted July 29, 2009 Exactly. Something like: RerwriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^/]+)/?$ user.php?username=$1 Link to comment https://forums.phpfreaks.com/topic/167926-architect-of-myspacefacebook-pretty-urls/#findComment-886265 Share on other sites More sharing options...
flash gordon Posted July 29, 2009 Author Share Posted July 29, 2009 great got ya. Thank a lot for your help! cheers Link to comment https://forums.phpfreaks.com/topic/167926-architect-of-myspacefacebook-pretty-urls/#findComment-886337 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.