View Full Version : ? in URL string
cgibie
05-13-2007, 01:23 AM
Hey guys I came across a site: http://www.testing.com/results/all/?keyword=test
My question is how come it has that "?" there. I meant what type of method is it to get that implemented?
printf
05-13-2007, 01:49 AM
It's nothing special...
All servers define a default document type, so if the directory or url path => (/results/all/) contains the default document, (ie: index.php, or another like, index.html), the request is sent to that default document because no direct document was included in the request, only the directory or path was in the request. So when you add a ? to the right side of the url path ((/results/all/?=keyword). The server looks up the default document for that directory and passes the request via the method GET because a ? was included in the request, which passes the query string to that default document.
Ultragames
05-14-2007, 09:33 AM
Basicly what he said above is correct. However, it dosnt have to be an index.php or index.asp. Using htaccess of the like can redirect that information as well.
For instance,
www.site.com/products/shoes/?page=2
With htaccess the server could treat that like this:
www.site.com/products.php?category=shoes&page=2
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.