Jump to content

URL Question?


Superian

Recommended Posts

I have come across the following URL addresses in many different site, so I was

wondering are the two similar or the same?

 

Both are PHP Sites!

 

Notice the forward slash before the question mark!

/?state=logout

Are the two addresses doing the same thing? If not, how are the two different?

page.php?state=logout

Link to comment
https://forums.phpfreaks.com/topic/91999-url-question/
Share on other sites

Yes, they are doing the same thing. In the first example, the URL has specified the directory, but not the file, so the web server will attempt to load the "default" file in that directory based upon the default list. Usually something like: index.php, default.php, index.htm, etc. So the first one is actually referring to something like: index.php?state=logout

 

The second example has identified the file (page.php) in addition to the parameters

 

Link to comment
https://forums.phpfreaks.com/topic/91999-url-question/#findComment-471251
Share on other sites

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.