How to download file without extension from IIS

sourav dutta 231 Reputation points
2023-09-15T08:38:16.4766667+00:00

Hello,

I have a .rtf file in IIS directory.

I can able to download the file as "souravdutta.com/filename.rtf".

But my requirement is to download the file without extension as "souravdutta.com/filename".

Is this possible?

If yes then where to change in config file?

Internet Information Services
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,909 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. MotoX80 33,371 Reputation points
    2023-09-15T15:56:41.8633333+00:00

    On the web site try adding a mime type of "." as an application/rtf.

    User's image

    0 comments No comments

  2. Lex Li (Microsoft) 5,572 Reputation points Microsoft Employee
    2023-09-18T06:18:24.47+00:00
    1. Install URL Rewrite module installed.
    2. Open `web.config` file.
    3. Add or modify the `<system.webServer>` section with the following
    
    ```xml
    <configuration>
        <system.webServer>
            <rewrite>
                <rules>
                    <rule name="Rewrite to filename.rtf">
                        <match url="^filename$" />
                        <action type="Rewrite" url="filename.rtf" />
                    </rule>
                </rules>
            </rewrite>
        </system.webServer>
    </configuration>
    
    
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.