jonaofarc Posted July 10, 2007 Share Posted July 10, 2007 HELP! www.myspace.com/whatever how is it going to a particular page, usually one would have something like userID=Something in the URL and it will point somewhere but in this case just www.jamba.com/johndoe how does this work? anyone Link to comment https://forums.phpfreaks.com/topic/59242-help-wwwmyspacecomwhatever-how-is-it-going-to-a-particular-page/ Share on other sites More sharing options...
Asday Posted July 10, 2007 Share Posted July 10, 2007 HELP! www.myspace.com/whatever how is it going to a particular page, usually one would have something like userID=Something in the URL and it will point somewhere but in this case just www.jamba.com/johndoe how does this work? anyone Ok, that made no sense to me. Link to comment https://forums.phpfreaks.com/topic/59242-help-wwwmyspacecomwhatever-how-is-it-going-to-a-particular-page/#findComment-294246 Share on other sites More sharing options...
Jewbilee Posted July 10, 2007 Share Posted July 10, 2007 it made total sense to me just by reading the topic.. he wants to know: how does www.myspace.com/username forward to the proper url or something like... myspace.com/viewprofile.php?username=username. I've gotten it working before, but I cant remember so someone else will have to help Link to comment https://forums.phpfreaks.com/topic/59242-help-wwwmyspacecomwhatever-how-is-it-going-to-a-particular-page/#findComment-294248 Share on other sites More sharing options...
zq29 Posted July 10, 2007 Share Posted July 10, 2007 It's done with URL re-writing. Apache has the module mod_rewrite that handles this. The rules are based on regular expressions, so something like RewriteRule ^([A-Za-z0-9])$ /view.php?user=$1 would point http://something.com/someone would point to http://something.com/user.php?user=someone Link to comment https://forums.phpfreaks.com/topic/59242-help-wwwmyspacecomwhatever-how-is-it-going-to-a-particular-page/#findComment-294249 Share on other sites More sharing options...
jitesh Posted July 10, 2007 Share Posted July 10, 2007 In web server admin is setting a directory index For example the seting is like this DirectoryIndex index.php index.html login.php ......... when you write www.myspace.com/whatever in whatever folder -> server search index.php file. if do not found index.php then search index.html if do not found index.html then search login.php and so on... if search found the file then execute it which you are not founding in address bar. otherwise you will get "Page can not be Found". Link to comment https://forums.phpfreaks.com/topic/59242-help-wwwmyspacecomwhatever-how-is-it-going-to-a-particular-page/#findComment-294250 Share on other sites More sharing options...
jonaofarc Posted July 10, 2007 Author Share Posted July 10, 2007 URL re-writing, thats what I needed to know, I'm going to read up on this now. In the mean-time thank you for taking the time out of your lives to help me figure this out. Jona. Link to comment https://forums.phpfreaks.com/topic/59242-help-wwwmyspacecomwhatever-how-is-it-going-to-a-particular-page/#findComment-294253 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.