How does the NE flag in mod_rewrite affect the redirection process in PHP?

When the NE flag in mod_rewrite is used, it prevents mod_rewrite from escaping special characters in the rewritten URL. This can be useful when passing URL parameters to a PHP script, as it ensures that the parameters are not double-encoded. To handle this in PHP, you can use the $_SERVER['REQUEST_URI'] variable to retrieve the original, unmodified URL.

$original_url = $_SERVER['REQUEST_URI'];
// Use $original_url in your PHP script to access the unescaped URL parameters