Pages

16 March, 2012

How to use extension in the Sitecore Media Request URL – 8

Go to Web.config file and find a setting named “Media.RequestExtension” and remove the extension value.
<!--  MEDIA - REQUEST EXTENSION                
The extension to use in media request URLs. If the value is not set, the Extension field of the individual media items will be used (ie. JPG, GIF, etc.)
Default value: "ashx"-->
      <setting name="Media.RequestExtension" value="ashx" />

Remove ashx from the value.
      <setting name="Media.RequestExtension" value="" />


Sample:
Before change      : /~/media/Images/logo.ashx
After change         : /~/media/Images/logo.png (ashx also will work.)



No comments:

Post a Comment

blockquote { margin: 0; } blockquote p { padding: 15px; background: #eee; border-radius: 5px; } blockquote p::before { content: '\201C'; } blockquote p::after { content: '\201D'; }