Mobile app version of vmapp.org
Login or Join
Annie201

: Does /? always equal /defaultscript? I'm trying to reduce the number of redirects and number of duplicate content pages and somehow I think that the first occurrence of /? in a URL actually

@Annie201

Posted in: #Url #UrlRewriting

I'm trying to reduce the number of redirects and number of duplicate content pages and somehow I think that the first occurrence of /? in a URL actually means /firstfoundscript? where "firstfoundscript" could be index.php or index.html or anything like that.

I also think if someone were to access:
example.com/a/b/?/c/d/?/e

That it would actually mean:
example.com/a/b/firstfoundscript?/c/d/?/e

Am I correct with this thinking?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Annie201

1 Comments

Sorted by latest first Latest Oldest Best

 

@Kimberly868

Yes you are correct though it is not because of the combination of /?.

Before going into further detail it is worth noting that for it to be a valid URL there should be a maximum of one question mark (?) since this is a special character signifying the start of the query string. If you wish to have a question mark within your query string data then it must be URL-encoded, e.g. %3F.

The part of the URL starting with a question mark (?) is called the query string and essentially is a sequence of parameters in the format ?param1=value1&param2=value2&param3=value3, where the value in each case follows the equals symbol (=), and each parameter value pair is separated by an ampersand ('&').

To help identify the script which will be accessed, first remove this component of the URL, and in your case this leaves you with example.com/a/b/. Whenever a folder path is specified but has no filename on the end, the webserver selects from a list of configured default files, e.g. index.html, index.php, index.asp.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme