CDN 用戶操作
CDN User Guide
CDN User Guide
  • Domain Management
    • Add Domain
    • Batch Modify Upstream
    • Batch Remove Specific Domains
    • Export Site Records
  • Modules
    • Site Certificate
    • Token Auth
    • Custom Header
    • Redirects
    • CORS Setting
    • Proxy Rewrite
  • Site Settings
    • Cache Setting
    • Compress
    • Rates Limit
    • DNS API
    • Ports
  • Firewall
    • Whitelist Setting
    • Blacklist Setting
    • Positions Setting
    • Anti CC Setting
    • Interval Freq. Limit
    • Second Freq. Limit
    • User Agent Setting
  • ACL
  • Block List
  • Error Pages
  • Site Info.
Powered by GitBook
On this page
  • How to Configure URL Rewriting?
  • Configuration Example:
  • Batch Configuration Explanation
  1. Modules

Redirects

PreviousCustom HeaderNextCORS Setting

Last updated 6 months ago

How to Configure URL Rewriting?

  • Navigate to Sites -> Sites Settings -> Module -> Redirect

  • Click "Create URL Rewrite Set" and enter the name of the configuration set.

  • Edit the URL Rewrite Configuration Set.

  • Click Add URL Rewrite.

  • Choose between Single or Batch configuration.

  • Configure the URL (you can choose regular expressions or not) and the rewrite content (you can refer to the example configuration rules below).

  • Apply the URL Rewrite Configuration Set to the domain:

    • Click on Domain Management.

    • Click on the domain you want to redirect.

    • Edit Domain -> Advanced Settings -> Select your custom URL redirection settings.

Configuration Example:

  • From: http://aaa.com/any-URI redirect to http://bbb.com/

  • URL (Regular Expression): (http|https):\/\/aaa.com\/(.*)

  • Rewrite to: https://bbb.com/$2

In the regular expression, each set of parentheses can be referenced in the rewrite field as $1, $2, etc

Batch Configuration Explanation

Format: <redirect code> <URL> <Rewritten URL> Example:

301 (http|https):\/\/aaa.com\/(.*) https://bbb.com/$2
301 (http|https):\/\/ccc.com\/(.*) https://ddd.com/$2