Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.