Movatterモバイル変換


[0]ホーム

URL:


  1. Home
  2. Reference documentation
  3. VCL reference
  4. Variables in VCL
  5. Client request

req.url.dirname

STRING, read-only.

Available inall subroutines.

The directories specified in a URL. This will be from the beginning of the URLup to the last/, not including the query string.

Any trailing slash is stripped. That is, the last/ will not be part ofreq.url.dirname unlessreq.url.dirname is/ (the root directory).

The slash after a directory is required. For example with a URL path of/xyz/abc?xyztheabc part is considered a filename (seereq.url.basename)and the value ofreq.url.dirname will be/xyz.

The directory name is given as/ when the directory is absent entirely.For example with a requestwww.example.com/hello.html,req.url.dirnamewill be/.

Examples

In the requestwww.example.com/1/hello.gif?foo=bar,req.url.dirname willbe/1.

In the requestwww.example.com/5/inner/hello.gif?foo=bar,req.url.dirnamewill be/5/inner.


[8]ページ先頭

©2009-2025 Movatter.jp