Sitecore Box

Sitecore web developer at Americaneagle.com

Sitecore Media Items Extensions and SEO


Introduction

Sitecore stored all media URLs that referenced inside RTE (Rich Text Editor) with .ashx extension. This will may cause a problem with old browsers that use the extension instead of applying the MIME type in the HTTP response header, and also for SEOs that allow filtering results by extension.


How to use the original extension?

A.   Change the settings for the uploaded files in the future.

To solve this problem we need to update the configuration for Sitecore to use the original file extensions rather than .ashx. To do so we need to update ‘Media.RequestExtension’ setting in config file.

What we should have to do is create new config file contains the below content and put the file under App_Config\Include folder:


B. How to force the RTE to add item extension instead of .ashx?

The big challenge here is how to update all media links which are already stored in RTE or File fields?

The below code snippet will solve this issue by looping on all items which have media links with .ashx extension and replace the extension with the original one:




My beginning with Sitecore®



Introduction

New to Sitecore®? Then this article for you.
This article for absolute beginners starts with Sitecore® based on my actual experience.


My beginning with Sitecore®

My journey with Sitecore® started in the end of 2017 when a friend of mine (Mohammed Syam Sitecore MVP) told me about Sitecore® capabilities and features, and he has encouraged me to register in Developer Trial Program which has been offered by Sitecore®.


You can register for the trial program using this link:




After registering with this program you will receive a 60-day trial license in order to install Sitecore, and you will be able to access the e-learning site and going through the Developer Foundations eLearning and that’s what I experienced.

After completing the whole training you will be able to:
  •  Describe Sitecore’s architecture.
  •  Identify the Sitecore applications and their users.
  •  Define roles that interact with Sitecore.
  •  Describe the templates building blocks.
  • Name the field types and their purpose.
  • State the importance of setting up icons on templates.
  • Define a Sitecore item.
  • Create content items based on templates.

Once you complete this you will be able to work with Sitecore, at the end, I want to thank Sitecore and Sitecore community for the chance.