Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using IIS to serve files without extension as plain text

I've tried using an answer from IIS: How to serve a file without extension?

 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
     <system.webServer>
         <staticContent>
             <mimeMap fileExtension=".*" mimeType="text/plain" />
         </staticContent>
     </system.webServer>
 </configuration>

Which is letting me target the file, but not access it

HTTP Error 404.3 - Not Found

The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.

like image 665
Daniel Avatar asked Jan 12 '15 18:01

Daniel


1 Answers

Try this

<staticContent>
   <mimeMap fileExtension="." mimeType="text/html" />
</staticContent>
like image 149
Pankaj Kapare Avatar answered Oct 17 '22 22:10

Pankaj Kapare