Allow custom header value by .htaccess

July 13, 2021 . 1 MIN READ

https://stackoverflow.com/questions/50865917/use-htaccess-to-only-allow-requests-if-a-header-with-a-specific-value-is-presen

 

This rule should work for you:

RewriteCond %{HTTP:x-test-header} !^abc123$ [NC]

RewriteRule ^ – [F]

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *