Reputation: 1
I have multiple PDF media files in a Kentico 11 website which I have redirected to our new website where the updated media file documents now reside. We must keep these old media files on the original website due to various resources which reference these file links (which now redirect to the new site with the updated files).
I would like to exclude these old media files from being found through the universal website search on the original website.
The files need to remain on the original website for redirect purposes but want to exclude them from search.
Thank you for any help.
Upvotes: 0
Views: 95
Reputation: 470
I assume the media files are stored in the Content Tree using (your own copy of) the CMS.File page type? You have to update your Search index to exclude this CMS.File page type or excluded a certain path. Kind of depends how you can identify these files.
Something like:
Path: /YourArchivedDocuments/%
Page types: CMS.File
This will exclude all CMS.File types that are located anywhere below the YourArchivedDocuments folder.
See more info about how to exclude on devenet: https://docs.kentico.com/k11/configuring-kentico/setting-up-search-on-your-website/using-locally-stored-search-indexes/creating-local-search-indexes/defining-local-page-indexes#Defininglocalpageindexes-Addingexcludedcontent
If you have the media stored in the Media Library you probably have coded a Custom Search Index since Kentico won't index Media library files out of the box. So you would have to adjust your custom code.
Upvotes: 1