Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Prevent Robots.txt file from getting downloaded

Avatar

Level 5

My robots.txt file is added to content/dam and I have added rewrite rules for the same in my dispatcher. I have update the robots.txt path in Content Disposition under exclude path. Yet, the the robots file gets downloaded instead of showing in browser. 

 

In disposition config: if i add entire path tille robots.txt, it fails to load on browser. If i add /content/dam*:text/plan, it works.

But the above will block all text type file. So i made change in dispatcher rewrite rule file:

<LocationMatch "/content/dam/site/robots.txt">
ForceType text/plain
Header set Content-Disposition inline
</LocationMatch>

1 Accepted Solution

Avatar

Correct answer by
Level 9

The issue looks like more of browser cache. I followed the same and it works fine after clearing the cache.

Please clean browser cache or try in different browser.

Screenshot of configuration working fine for me.

 

sachinarora_0-1661349258322.png

 

View solution in original post

4 Replies

Avatar

Correct answer by
Level 9

The issue looks like more of browser cache. I followed the same and it works fine after clearing the cache.

Please clean browser cache or try in different browser.

Screenshot of configuration working fine for me.

 

sachinarora_0-1661349258322.png