bcoffin Posted September 11, 2006 Share Posted September 11, 2006 I'm building an intranet for my company and want to be able to give my coworkers (there are about 150) the ability to create their own news/photos pages. I took a look at MySpace and certainly don't want anything that complicated but was wondering how they do the dynamic URLs part..ie: if my site lives at:http://intranet/how do I configure my web server (or better yet, just the PHP code), so that if an employee does create his own page, then I can use:http://intranet/alanhttp://intranet/bettyhttp://intranet/charlieand have that URL actually resolve instead of say "Page Not Found"I'd rather not create all these web directories one by one, or even have the php create them and copy the necessary scripts into the folders. Is there a way to use apache look-back, or php $_SERVER global to just place the script in the webroot and grab these values?Thanks all,benny Quote Link to comment Share on other sites More sharing options...
obsidian Posted September 11, 2006 Share Posted September 11, 2006 you'd want to use mod_rewrite most likely. that way, you could pass a variable through the URL and have it rewritten into whatever pattern you'd like on the server. Quote Link to comment Share on other sites More sharing options...
bcoffin Posted September 11, 2006 Author Share Posted September 11, 2006 very cool.. that's just one .htaccess doc, then, rather than a ton of other bs.Thanks for the suggestion -- I'll google around for docs on that, do you have any handy?Benny Quote Link to comment Share on other sites More sharing options...
obsidian Posted September 11, 2006 Share Posted September 11, 2006 check out [url=http://www.phpfreaks.com/tutorials/23/0.php]this tutorial[/url] from right here at phpfreaks Quote Link to comment Share on other sites More sharing options...
bcoffin Posted September 11, 2006 Author Share Posted September 11, 2006 Looks like just the gem I'm looking for!Thanks again obsidian. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.