Connected: An Internet Encyclopedia
RFC 1808

Top: Connected: An Internet Encyclopedia
Up: Requests For Comments

Search: |  | Search Depth: |
Search Type: | String RegEx | Search Options: | NoCase WholeWord

Next: 1. Introduction

Network Working Group
Request for Comments: 1808
Category: Standards Track

R. Fielding
UC Irvine
June 1995

### Relative Uniform Resource Locators

### Status of this Memo

This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.

### Abstract

A Uniform Resource Locator (URL) is a compact representation of the location and access method for a resource available via the Internet. When embedded within a base document, a URL in its absolute form may contain a great deal of information which is already known from the context of that base document's retrieval, including the scheme, network location, and parts of the url-path. In situations where the base URL is well-defined and known to the parser (human or machine), it is useful to be able to embed URL references which inherit that context rather than re-specifying it in every instance. This document defines the syntax and semantics for such Relative Uniform Resource Locators.

### Table of Contents

1. Introduction
2. Relative URL Syntax

2.1. URL Syntactic Components
2.2. BNF for Relative URLs
2.3. Specific Schemes and their Syntactic Categories
2.4. Parsing a URL

2.4.1. Parsing the Fragment Identifier
2.4.2. Parsing the Scheme
2.4.3. Parsing the Network Location/Login
2.4.4. Parsing the Query Information
2.4.5. Parsing the Parameters
2.4.6. Parsing the Path

3. Establishing a Base URL

3.1. Base URL within Document Content
3.2. Base URL from the Encapsulating Entity
3.3. Base URL from the Retrieval URL
3.4. Default Base URL

4. Resolving Relative URLs
5. Examples and Recommended Practice

5.1. Normal Examples
5.2. Abnormal Examples
5.3. Recommended Practice

6. Security Considerations
7. Acknowledgements
8. References
9. Author's Address
10. Appendix - Embedding the Base URL in HTML documents

Original text document

Next: 1. Introduction

Connected: An Internet Encyclopedia
RFC 1808