Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
URL with or whithout Domain Names
How can I avoid using the whole URL?
✍: FYIcenter
The URL structure defines a hierarchy (or relationship) that is similar to the hierarchy of subdirectories (or folders) in the filesystems used by most computer operating systems. The segments of a URL are separated by slash characters ("/"). When navigating the URL hierarchy, the final segment of the URL (i.e., everything after the final slash) is similar to a file in a filesystem. The other segments of the URL are similar to the subdirectories and folders in a filesystem.
A relative URL omits some of the information needed to locate the referenced document. The omitted information is assumed to be the same as for the base document that contains the relative URL. This reduces the length of the URLs needed to refer to related documents, and allows document trees to be accessed via multiple access schemes (e.g., "file", "http", and "ftp") or to be moved without changing any of the embedded URLs in those documents.
Before the browser can use a relative URL, it must resolve the relative URL to produce an absolute URL. If the relative URL begins with a double slash (e.g., //www.yoursite.com/faq/html/), then it will inherit only the base URL's scheme. If the relative URL begins with a single slash (e.g., /faq/html/), then it will inherit the base URL's scheme and network location.
If the relative URL does not begin with a slash (e.g., all.html ,
./all.html or ../html/), then it has a relative path and is resolved as
follows.
Some examples may help make this clear. If the base document is <URL:http://dev.fyicenter.com/faq/xhtml/index.html>, then:
all.html and ./all.html refers to:
http://dev.fyicenter.com/faq/xhtml/all.html
./ refers to:
http://dev.fyicenter.com/faq/xhtml/
../ refers to:
http://dev.fyicenter.com/faq/
../index.html refers to:
http://dev.fyicenter.com/faq/index.html
../../faq/css/ refers to:
http://dev.fyicenter.com/faq/css/
/faq/css/ refers to:
http://dev.fyicenter.com/faq/css/
2007-03-03, 6101👍, 0💬
Popular Posts:
How To Run "mysql" Commands from a Batch File? - MySQL FAQs - Command-Line End User Interface mysql ...
Can you explain in brief how the ASP.NET authentication process works? ASP.NET does not run by itsel...
How To Wirte a Simple JUnit Test Class? This is a common test in a job interview. You should be able...
How To Manage Transaction Isolation Level? - Oracle DBA FAQ - Introduction to PL/SQL Transaction iso...
How do we enable SQL Cache Dependency in ASP.NET 2.0? Below are the broader steps to enable a SQL Ca...