Trying to add X-Robots-Tag HTTP header on application/rss+xm

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Trying to add X-Robots-Tag HTTP header on application/rss+xm

Postby arakpt » 25. July 2021 13:07

hi

i want to add x robots tag on specific pages (Content-Type: application/rss+xml; charset=UTF-8) globaly on httpd conf
but i can't get it work

i tried this code

Code: Select all
<FilesMatch "\.(xml|rss)$">
Header set X-Robots-Tag "noindex"
</Files>


the url are not ending with .xml or rss but its an xml/rss pages (its a wordpress permalinks)

Code: Select all
http://localhost/feed
http://localhost/post-123/feed


i still cant see any X-robot-Tag on response header

Code: Select all
Final response
< HTTP/1.1 200 OK
< Date: Sun, 25 Jul 2021 10:27:42 GMT
< Content-Type: application/rss+xml; charset=UTF-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< X-Powered-By: PHP/7.3.10
< Last-Modified: Sun, 25 Jul 2021 10:28:01 GMT
< Set-Cookie: pvc_visits[0]=1627295281b60; expires=Mon, 26-Jul-2021 10:28:01 GMT; Max-Age=86400; path=/; secure; HttpOnly
< Link: ; rel="https://api.w.org/", ; rel="alternate"; type="application/json", ; rel=shortlink
< Cache-Control: max-age=3600
< Expires: Sun, 25 Jul 2021 11:28:00 GMT
< Vary: Accept-Encoding,User-Agent
< CF-Cache-Status: DYNAMIC
< Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
< NEL: {"report_to":"cf-nel","max_age":604800}
< X-Content-Type-Options: nosniff
< Server: cloudflare
< CF-RAY: 6744b
< alt-svc: h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443"; ma=86400

can someone help me setup the correct rule?
arakpt
 
Posts: 1
Joined: 25. July 2021 12:58
XAMPP version: 3.3.0
Operating System: windows

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 87 guests