Prevent content items to be accessed from url route

Topics: Customizing Orchard
Mar 12, 2013 at 4:06 PM
Hi guys
I have a little concern when you create a content item in orchard you can access it using the default mvc route.
Like http://www.domain.com/Contents/Item/Display/212
I have some content item displayed inside a widget and i don't want theme to be accessed via url
How can i prevent that ?
Coordinator
Mar 13, 2013 at 12:03 AM
This looks like this bug: http://orchard.codeplex.com/workitem/19511

A workaround could be to use URL rewrite on anything http://www.domain.com/Contents/Item/Display/*
Coordinator
Mar 13, 2013 at 12:04 AM
Content Item permissions should take care of this in theory. Did you try that?
Mar 13, 2013 at 2:44 AM
Hi Bertrand
Thanks for your quick reply , i am about to set the permission for those content items . This was crossing my mind while i was studying the SEO for my website it looks like that those content items got indexed by google and the content of those Items exist on other pages so it s flagged as duplicate content which is not good for seo . So i thought i did something wrong . but then i tried to see how other people are managing this . So i did a google request for site:nwazet.com and find out the same issue if you go to the last page you`ll see all the content items are indexed .
Here is a print screen Image
Coordinator
Mar 13, 2013 at 3:06 AM
I agree, good point. We should actually do a permanent redirect from those when there is a known route for a content item and it's accessed through this path. Can you maybe edit the bug and add your findings to it?
Mar 13, 2013 at 3:38 AM
Created a new bug with all the details. As the existing one is closed and was about permissions !
Thanks for the input