Try this, make "archived pages" folder item "un-publishable" on all sites, do a publish site (smart publish), now all of archived pages are not on web database, because the parent folder is not publishable, and you should see a 404 page when hit this URL: http://www.site2.com/sitecore/content/Site1/Metadata/archived1pages/archived-page1
Sitecore Multi-Site: Prevent page in one site from appearing on another
Вопрос
I've inherited the maintenance of a multi-site instance of Sitecore (v6.5) that we're starting to see some cross-talk of pages. The content is structured as follows:
/sitecore
/content
/Site1
/Metadata
/Nav
/archived pages
/archived page1
/Home Page
/Internal Page1
...
/Site2
/Metadata
/Nav
/archived pages
/Home PAge
/InternalPages
...
For this example, site definitions are patched in such that www.site1.com
has a rootPath of /sitecore/content/
and a home item Site1/Home page
, www.site2.com
has a similar rootPath of /sitecore/content/
and a home item Site2/Home page
.
The content owners will move pages out from under the "Home Page" node to a folder called "archived pages" when they don't want them on the site anymore.
What I'm curious is if there is a way to prevent the following URL:
http://www.site2.com/sitecore/content/Site1/Metadata/archived1pages/archived-page1
Rendering.SiteResolving is currently set to true, so neither site should be producing links like this, but I'd like a way to have this sort of URL return a 404 without having to resort to writing a custom pipeline component. Am I missing a simple configuration to prevent this?
Решение