In PHP, output_reset_rewrite_vars() removes all rewrite variables previously stored by output_add_rewrite_var().
After a reset, later HTML flushed through the rewriter no longer receives those name/value pairs. Use it when a token should apply only to part of the output, or when you want to clear rewriter state.
Syntax
Call output_reset_rewrite_vars() with the values you need. Start with this line.
Often used between rewritten and non-rewritten sections.
Since PHP 7.1, this reset targets the dedicated output_add_rewrite_var() rewriter buffer, not session transparent-sid settings. Pair adds, flushes, and resets carefully so each section of HTML gets the query pairs you intend.
Library declarations
PHP
output_reset_rewrite_vars(): bool
Parameters
Parameter
Description
—
This function takes no parameters.
Return Value
Return Value
Description
bool
true on success, false on failure.
PHP Examples
Example 1 — Rewrite Then Reset
Add a rewrite var, flush one link, reset, then print a second link without the query pair.