Hi, I'm trying to redirect requests from a domain according to the value of a custom HEADER, but i can't This is what i did Header set testing "Test" RewriteCond %{testing} !^$ RewriteRule ^ - [F] Code (markup): With CURL I get the header, but not the 403 curl --head http://domainHTTP/1.1 200 OK Server: Apache/2.4.54 (Debian) Vary: Accept-Encoding testing: Test Content-Type: text/html Code (markup): This same with existing HEADERS works correctly RewriteCond %{REMOTE_ADDR} !^$ RewriteRule ^ -[F] Code (markup): Response curl --head http://domain HTTP/1.1 403 Forbidden Server: Apache/2.4.54 (Debian) Code (markup): Hope you can help, warm regards
RewiteCond has, usually, 2 params. A "test" and a "condition". If I'm right with your question, you have to do something like this RewriteCond "%{REQUEST_METHOD}" "HEAD" RewriteCond "%{HTTP:header}" "(match1|match2|match3)" RewriteRule "-" [F] Code (markup):