1

I'm unsure whether the following is correct considering I can't find a web example that targets a file inside a directory.

<FilesMatch "/out/index.php$">
Header set X-Robots-Tag "noindex, nofollow"
</FilesMatch>

is it ok that way or:

<FilesMatch "\out\index.php$">
Header set X-Robots-Tag "noindex, nofollow"
</FilesMatch>
lbennet
  • 1,083
  • 5
  • 14
  • 31

1 Answers1

1

First one is the right one as Apache like Unix systems uses forward slash for paths.

So the right one is:

<FilesMatch "/out/index\.php$">
    Header set X-Robots-Tag "noindex, nofollow"
</FilesMatch>
anubhava
  • 761,203
  • 64
  • 569
  • 643