1

I need to add a custom http header to every http response from my IIS 8.5, but only for specific file types (css, js and html).

I've tried this solution Add custom header based on file type, but it seems outdated, and I'm getting errors for bad web.config file.

How it can be done on IIS 8.5?
Any help will be appreciated.

Shlomi
  • 13
  • 1
  • 3

1 Answers1

1

Solution on this link still working Add custom header based on file type for your problem.

You weren't able to use it because you need to install URL Rewrite module for IIS.

Please go to https://www.iis.net/downloads/microsoft/url-rewrite , download, install it and then restart IIS. After this steps error about bad web.config file should gone

Victor Leontyev
  • 8,488
  • 2
  • 16
  • 36