Unpublish a page - link remains.
I've only just started developing with Sitefinity but I am sure in the last version of SF (4.4?) that when I unpublished a page or file, all links to that page were then removed - or did I dream this?
I created some links in SF 5 and then unpublished the files / pages and I am now getting 404 messages.
Have I missed something in the setup somewhere?
Hello,
It is normal for unpublished pages to throw a 404 error - this is the default behavior in unpublished pages. This behavior has remained the same throughout the previous versions of Sitefinity.
Please let us know if you have anymore questions or concerns.
Greetings,
Grace Hallwachs
the Telerik team
Is this still the case? Can I override the default behaviour to throw a 302 instead
Hi Matthew,
When you unpublish a page it's link into controls such as the Navigation widget for example will be automatically removed so you don't need to concern with it.
However if a link to that page has been added to a content block widget, after the page is being unpublished, it will throw a 404 not fount if a user tries to follow it.
You can either go and manually remove such links from the content blocks throughout the project (if you have any) or you can use UrlRewrite to point them to whatever location with needed status:
http://docs.sitefinity.com/seo-use-url-rewrite-for-iis
https://www.stormconsultancy.co.uk/blog/development/tips-tricks/handling-301-and-302-redirects-with-iis-7-url-rewrite/
Regards,
Pavel Benov
Telerik