Clean URL

A Clean URL or Pretty URL ( German about clean URL, pretty URL) is a Uniform Resource Locator (URL) that contains the readable words rather than technical shortcuts or database IDs. Thus, in the path neither part search or query- components still file name extensions such as. Html, contain. Php or other information on the used server technology, such as cgi -bin or cgi. Instead, readable and descriptive titles or lexicographic lemma, calendar usually the appearance and also the language of the content, usually used abbreviated according to ISO 639, in the URL.

Mixtures of two methods also occur by the ID is retained, but will be added readable words. In this case, the ID is the key feature of the URL and the words can be changed or omitted.

In practice, it is usually intended that store URLs from the Web browser as a bookmark and can again can be called at any later time. They should also be passed on to third parties and may be called by these and trigger the same action or produce the same state (eg perform a search ).

Examples

Clean URLs can be implemented at the Web server and the Web application. In the Web application, however, the web server must be configured accordingly.

Web server level

Most web servers such as Apache HTTP Server or nginx can "clean" URLs using. Htaccess or implemented with rewrite engines. These modules make it possible to internally rewrite queries against pre -defined rules using regular expressions, or reinterpret. Thus for example the request of foo / bar to achieve the same result as the request to / index.php? Q = / foo / bar. The CGI protocol provides another technique, it provides a script called as / index.php / foo / bar / foo / bar as PATH_INFO.

Web application

Some web content management systems already include the appropriate rewrite rules, thus enabling this is trivial.

Benefits

  • Users can the relevance of speaking URLs rate faster ( a descriptive URL is clicked rather generally as a cryptic )
  • User the URLs easier to remember ( and similar file extensions such as html or htm no longer need to be advised)
  • External links and bookmarks on a page are substantially longer valid because they are independent of internal changes
  • In the search engine optimization ( there also sefURL for search engine friendly ) are also evaluated domain and file names of individual pages in the search engine ranking of keywords in addition to the page content

Swell

193219
de