regex - htaccess x-robots-tag noindex pdf with exception -


i have situtation want x-robots noindex tag on pdfs except 1 (or few more later) pdf file(s). works fine , expected if use folling code put tags on pdfs:

#noindex für pdfs <ifmodule mod_headers.c>    <files ~ "\.pdf$">     header set x-robots-tag "noindex, nofollow"     </files> </ifmodule> 

but add rule 1 exception causes 500 status code on entire site. here code:

<ifmodule mod_headers.c>    <files ~ "\.pdf$">     header set x-robots-tag "noindex, nofollow"     </files>      <filesmatch "https\:\/\/example\.com\/folder\/file\.pdf$">     header set x-robots-tag "index, follow"     </filesmatch> </ifmodule> 

what doing wrong? appreciated. thanks!


Comments

Popular posts from this blog

javascript - WinJS appendTextAsync producing scheduler errors -

minify - Minimizing css files -

Sockets with kotlin -