Post ID 17138

The rewrite tool allows you to generate rules that modify demands and also reactions as they travel throughCharles. Rules suchas incorporating or changing a header or even searchand change some content in the reaction body.

Rewrite Places

Rewrite collections may be individually switched on as well as deactivated. Eachset contains a listing of areas and policies. The places select the demands and also feedbacks on whichthe policies will definitely run.

Rewrite Rules

Eachregulation describes a single rewrite procedure. The regulation might have an effect on the headers, the body system, or aspect of the demand LINK; it might operate on the demand and also or the reaction; it may after that determine hunt and replace or even only replace design rewording.


The style indicates the form of rewriting function to do. There are actually 4 various groups of rewrite rule styles; header guidelines, URL regulations, query specification policies, and body policies. The header and concern specification guidelines impact the header areas and also query cord criteria specifically; adding, modifying or getting rid of headers and specifications. The LINK and also body policies carry out discover and change on the different component of the URL and also on the body.


Choose where to relate the rewrite guideline; on the ask for, action or each.


The complement fields have the message to matchin the ask for or even feedback to determine whether to fire this rule. You may additionally leave the label or worthblank, or even each, to matchany kind of worth. If you leave behind boththe title as well as value fields empty you will matchall asks for/ feedbacks.

Regex support may be allowed, providing Perl-style routine articulations for your fit. If you consist of teams in your regular phrase they may be actually utilized in the suit fields.

The rewrite tool industry is a particular suit field unless regex is actually enabled, throughwhichsituation it assists partial matches. The title industry is case-insensitive for bothregex as well as typical matching. The label area might be impaired if you are making a rewrite rule style that doesn’t require it.

The market value area is a partial matchunless you activate Suit whole worththroughwhichscenario it is a specific complement. The value field is actually case-insensitive for eachregex as well as ordinary matching for header and inquiry guideline policies, and also case-sensitive for URL and physical body regulations.

New/ SwitchOut

The new/replace ranges have the content to add or even substitute in the request or even feedback when this policy is fired. Leave behind rewrite tool either the title or value space to leave all of them the like the matched title or even value.

If regex assistance is permitted for the fit you might reference fit groups using $1, $2 and so forth.

The behavior of the title as well as worthindustries depends upon the match. If there is an equivalent suit at that point the area functions as a substitute for the matched message, typically if the matchis blank at that point the fields substitutes the entire title or value.

The worthfield sustains Replace First or even Replace All methods. The label field always runs in replace-first setting if the name complement is a regex, otherwise it is actually an exact suit as well as replaces the whole label.

The name as well as or worthareas may be disabled if you are actually producing a rewrite regulation type that does not require them.


Rewrite regulations may be challenging to debug if they are certainly not operating as you count on. It is actually frequently well to develop a guideline little by little withrecurring screening.

Location Matching

Eacharea suit may have procedure, multitude, port and also pathpatterns to matchparticular URLs. Locations may consist of wildcards. Even more assistance for producing place matches may be actually discovered when you add a new site to this rewrite tool.


The rewrite tool can be difficult to debug when your rewrite operation isn’t working as anticipated. If you have trouble attempt including a really standard regulation suchas one that includes an apparent header, therefore you can view whether your regulations are actually matching the request at all. Likewise turn on Debug in Error Log to obtain some debugging information published in the Mistake Log accessed from the Home window menu in Charles.