URL Rewrite

Chute can rewrite the request's URL with 2 different methods, or reject certain requests by URL.

Only one rule could be applied for one single request.

Example:

[URL Rewrite]
^http://www\.google\.cn http://www.google.com header
^http://amazon\.cn https://z.cn 302
^http://ad\.com/ad\.png _ reject

The rewrite rule consists 3 parts: regular expression, replacement and type.

Header Mode

Chute will modify the request header and redirect the request to another host if necessary. The client will not notice this rewrite action.

The "Host" field in request header will be modified to match the new URL.

[URL Rewrite]
^http://www\.google\.cn http://www.google.com header

You can't redirect to an URL with HTTPS scheme. And you can't redirect a HTTPS request.

302 Mode

Chute will simply return a 302 redirect response. HTTPS requests can be redirected if MitM for the hostname is enabled.

[URL Rewrite]
^http://amazon\.cn https://z.cn 302

307 Mode

Chute will simply return a 307 temporary redirect response. HTTPS requests can be redirected if MitM for the hostname is enabled.

[URL Rewrite]
^http://amazon\.cn https://z.cn 307

Reject Mode

Reject the request if the pattern is matched. The replacement parameter will be ignored. HTTPS requests will be rejected if MitM for the hostname is enabled.

[URL Rewrite]
^http://ad\.com/ad\.png _ reject
S. Smart Rabbit LLC © All Rights Reserved            updated 2022-06-13 06:55:00

results matching ""

    No results matching ""