All Products
Search
Document Center

:Rewrite origin request parameters

Last Updated:Apr 30, 2026

If a user's request URL contains parameters that differ from what the origin server requires, you can use the parameter rewrite feature to modify the query parameters in the origin request. This feature lets you add, delete, modify, and reserve specific parameters, or ignore all parameters.

Background

The parameter rewrite feature modifies the query parameters of an origin request URL. You can configure multiple rewrite rules. The rules are applied in the following priority order: Add > Delete > Ignore Parameters and Reserve Only > Modify. If multiple rules target the same parameter, only the highest-priority rule is applied.

Note

Ignore Parameters and Reserve Only are mutually exclusive. Do not configure both parameters at the same time.

改写参数图

Conflicts

The parameter rewrite feature can conflict with the enhance break rule of the URI rewrite feature and the parameter filtering feature. Avoid creating conflicting configurations. If a conflict occurs, the last configured feature takes precedence.

Note
  • DCDN processes parameter rewrite rules at the origin POP. This does not affect the internal request flow or the cache key.

  • DCDN processes parameter filtering rules at the edge POP. This affects the internal request flow and changes the cache key.

Procedure

  1. Log on to the DCDN console.

  2. In the left-side navigation pane, click Domain Names.

  3. On the Domain Names page, find the domain name that you want to manage and click Configure in the Actions column.

  4. In the domain's left-side navigation pane, click Origin Fetch.

  5. Click the Parameter Rewrite tab.

  6. On the Parameter Rewrite tab, enable Use Parameter Rewrite.

  7. Configure your rewrite rules.

    Configure rules based on your business needs. For details, see Configuration examples.

    回源参数改写

  8. Click OK to apply the configuration.

    You can also click Modify Configuration on the Parameter Rewrite page to change existing rules.

    回源参数改写

Note

Note: If you use this feature as an action within the Rules Engine, the rule priority set in the Rules Engine overrides this feature's internal operation priority.

Configuration examples

  • Example 1: Ignore all parameters.

    1

    Parameter

    Example

    Ignore Parameters

    Enabled

    Add

    None

    Delete

    None

    Reserve Only

    None

    Modify

    None

    Expected result

    Original request: http://example.com/index.html?code1=1&code2=2&code3=3

    Rewritten origin request: http://example.com/index.html

  • Example 2: Reserve a specific parameter.

    2

    Parameter

    Example

    Ignore Parameters

    None

    Add

    None

    Delete

    None

    Reserve Only

    code2

    Modify

    None

    Expected result

    Original request: http://example.com/index.html?code1=1&code2=2&code3=3

    Rewritten origin request: http://example.com/index.html?code2=2

  • Example 3: Add, delete, and modify parameters.

    3

    Parameter

    Example

    Ignore Parameters

    None

    Add

    code4=4

    Delete

    code2

    Reserve Only

    None

    Modify

    code3=0

    Expected result

    Original request: http://example.com/index.html?code1=1&code2=2&code3=3

    Rewritten origin request: http://example.com/index.html?code1=1&code3=0&code4=4