If you are using Apache, you need to add a .htaccess
rule similiar to this:
RewriteEngine On
redirectMatch 301 ^(.*)\.jpg $1
In the case of IIS (which I haven't used at all!), consider using something like this:
<rewrite>
<rules>
<rule name="rewrite php">
<!--Removes the .php extension for all pages.-->
<match url="(.*)" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_FILENAME}" negate="true" pattern="(.*).jpg" />
</conditions>
<action type="Rewrite" url="{R:1}.jpg" />
</rule>
</rules>
</rewrite>
I'm sure that you have to change this based on your need.