www.domain/privacy-policy/
The "privacy policy" is in the URL path, not in the query string, as you used in your directive. Instead, try something like the following: near the top of your file .htaccess:
RewriteEngine On
RewriteRule ^privacy-policy - [env=NOINDEXFOLLOW:true]
Header set X-Robots-Tag "noindex, follow" env=NOINDEXFOLLOW
However, it would be preferable to use mod_setenvif instead of mod_rewrite to set the environment variable:
SetEnvIf Request_URI "^/privacy-policy" NOINDEXFOLLOW
UPDATE:. front-controller ( WordPress), RewriteRule .htaccess, WP. WP, . ( SetEnvIf Header , .)
, - index.php, NOINDEXFOLLOW , . index.php Apache REDIRECT_NOINDEXFOLLOW (REDIRECT_ ), , Header. , :
SetEnvIf Request_URI "^/privacy-policy" NOINDEXFOLLOW
Header set X-Robots-Tag "noindex, follow" env=REDIRECT_NOINDEXFOLLOW
( .)
RewriteRule , NOINDEXFOLLOW, .