Facebook Twitter Instagram YouTube LinkedIn WhatsApp
    Facebook Twitter Instagram LinkedIn WhatsApp
    ZaveRizwanZaveRizwan
    Subscribe
    • Home
    • Features
      • Example Post
      • Typography
      • Contact
      • View All On Demos
    • Mobiles
    • Typography
    • Mobiles
      • Tech
      • Gadgets
      • Insights
    • Buy Now
    ZaveRizwanZaveRizwan
    Behavior

    Redirect

    zaiveeBy zaiveeFebruary 6, 2023No Comments3 Mins Read

    Respond to the client’s request with a redirect without contacting the origin.

    How it works

    With this behavior enabled, you can offload your origin from specified redirects and speed up the performance for end-users.

    Features and options

    Field What it does Sub-options
    Redirect Type Redirect specifically for mobile sites or for all sites.
      • Default
      • Mobile
    Destination Protocol Select the protocol of the redirect destination URL.
      • Same as request
      • HTTP
      • HTTPS
    Destination Hostname Specify how to change the requested hostname.
    • Same as request
    • Add subdomain to request
    • Substitute requested subdomain
    • Static hostname
    Subdomain to Add With Destination Hostname set to Substitute requested subdomain, specify the alternative subdomain to use instead of the requested subdomain. For example, to redirect from www.home.example.com to m.home.example.com, enter m.
    Variable Support: This option supports variable expression syntax. Typing {{ in the option field triggers variable auto complete.
    Substitute Subdomain With Destination Hostname set to Substitute requested subdomain, specify the alternative subdomain to use instead of the requested subdomain. For example, to redirect from www.home.example.com to m.home.example.com, enter m.
    Variable Support: This option supports variable expression syntax. Typing {{ in the option field triggers variable auto-complete.
    Static Hostname With Destination Hostname set to Static hostname, specify the static (absolute) hostname for the redirect destination URL.
    Variable Support: This option supports variable expression syntax. Typing {{ in the option field triggers variable auto-complete. Learn more about variable support.
    Destination Path Specify how to change the requested path.
    • Same as requested
    • Path Prefix and Suffix
    • Static Path
    Path Prefix With Destination Path set to Path Prefix and Suffix, specify any path components to prepend the requested path. For example, to redirect from /example/index.html to /prefix/example/index.html, enter /prefix.
    Variable Support: This option supports variable expression syntax. Typing {{ in the option field triggers variable auto complete.
    Path Suffix Status With Destination Path set to Path Prefix and Suffix, specify whether to include a suffix to your redirect destination.
    • Do not add suffix
    • Add a suffix
    Path Suffix With Path Suffix Status set to Add a suffix, specify the path components to append to the requested path.
    Variable Support: This option supports variable expression syntax. Typing {{ in the option field triggers variable auto-complete. Learn more about variable support.
    Include Query String Indicate whether to append the query arguments to the destination query string.
    Redirect Status Code Select the HTTP status code to use in the redirect response.
      • 301 Moved Permanently
      • 302 Found
      • 303 See Other
      • 307 Temporary Redirect

    Tips and best practices

    You can specify the redirect URL relative to the current root path, or as a fully qualified URL:

    • Fully Qualified URL
      This redirects requests matching the rule to that URL with protocol-specified:
      http://www.example.com/example/path/file.ext
    • Relative to the Current Root Directory, using a / prefix
      This redirects the request to a different specific path under the same host root directory, using the same protocol:
      /example/path/file.ext

    You can also choose to ignore query request parameters, append request parameters to destination parameters, or prefer request parameters over the destination parameters, when available.

    Related Posts

    webdav

    February 6, 2023

    downgradeProtocol

    February 6, 2023

    randomSeek

    February 6, 2023
    Add A Comment

    Leave A Reply Cancel Reply

    © 2023 ZaveRizwan. Designed by ZaveRizwan.
    • Home
    • Tech
    • Gadgets
    • Mobiles
    • Buy Now

    Type above and press Enter to search. Press Esc to cancel.