What kind of HTML link is this? And how does it work?
I've researched in PHP, and it similar code, but href does not include file extension.
<a href="/directory/subdirectory/category?catID=2"> Link </a>
What kind of HTML link is this? And how does it work?
I've researched in PHP, and it similar code, but href does not include file extension.
<a href="/directory/subdirectory/category?catID=2"> Link </a>
the domain will be the prefix for this link, after that it will be like it:
www.example.com/directory/subdirectory/category?catID=2
and ?catID=2
is QueryString that transfer data in url.
The
?catID=2
at the end means ur passing information to the url.
?
means that ur going to pass on info.
catID=2
is saying that ur going to pass on catID with a value of 2.
so
<a href="/directory/subdirectory/category?catID=2"> Link </a>
means ur passing on catID with a value of 2 to link:
directory/subdirectory/category
That URL sends you to the index (main) page of the /directory/subdirectory/category
directory on the root of whatever website the link is on.
For example, on example.com
, that link would send you to http://example.com/directory/subdirectory/category/index.html?catID=2
. However, the /index.html
will not show in the URL bar. The ?catID=2
is a query string. There is no extension because the server will automatically send the index.html
file in the specified directory if there is no specific file requested. (Note: index.html
is the default. Back-end scripts can change what file gets sent.)
Yes, links can be that way. It is a query to the directory on the site you're checking out.
www.example.com/directory/subdirectory/category?catID=2
Can become
<a href="/directory/subdirectory/category?catID=2"> Link </a>
on example.com
This type of link shows that you are entering a particular directory in the root of the website. Let say you saw this link from a website called me.com then it means you have
me.com/directory/subdirectory/category?catID=2
However /directory/subdirectory/category?catID=2
is a query to the directory on that website.