1 # Redirect file. 2 # This file contains the list of rewrite rules that are applied when serving 3 # pages. 4 # 5 # Each redirect has four parts: 6 # 7 # - src: The path to redirect. This is a regex rule prefixed with an implied 8 # '^'. Unless you're doing something advanced, your path should start with 9 # '/' character. 10 # 11 # - dst: The path to redirect to. If the path begins with a slash, 12 # it is considered a relative redirect. Otherwise, it is an absolute 13 # redirct (and should probably begin with http: or http://). You may use 14 # capturing groups to preserve part of the source path. To referece a 15 # capturing group, use \N, where N is the (1-based) index of desired group. 16 # 17 # - type: Either 'permanent' or 'temporary', depending on whether you want an 18 # HTTP 301 or HTTP 302 redirect, respectiviely. See RFC 2616 for the 19 # difference between these: 20 # 21 # http://tools.ietf.org/html/rfc2616 22 # 23 # If you don't specify a type, 'permanent' will be used by default. Note that 24 # this is different from the Apache convention (which uses 'temporary' by 25 # default.) 26 # 27 # - comment: Currently ignored by the computer, but useful for humans. 28 # 29 # Example: 30 # 31 # redirects: 32 # - src: /foo 33 # dst: /bar 34 # # Redirect /foo to /bar. This will also redirect foo/ and 35 # # foo/test.html. Note that the redirect type is optional. This will be 36 # # treated as a permanent redirect. 37 # 38 # - src: /(.+droid(/.*)?)$ 39 # dst: /droids/\1 40 # type: permanent 41 # # Redirect /android to /droids/android and /bugdroid to 42 # # /droids/bugdroid. However, it will not redirect /droid or 43 # # /bugdroids. 44 # 45 # - src: /google 46 # dst: http://www.google.com 47 # type: temporary 48 # # This is an example of a redirect to an absolute URI. 49 # 50 51 redirects: 52 - src: /%2B/?$ 53 dst: https://plus.google.com/b/108967384991768947849/ 54 type: permanent 55 comment: Redirect /+ and /+/ to Google+ 56