Jump to content

HELP! www.myspace.com/whatever how is it going to a particular page...


jonaofarc

Recommended Posts

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.

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

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

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".

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.