Writerside Help

Place redirects

When you rework and restructure content and remove topics from a help instance, you need to place redirects from the corresponding URLs so that users who have an old link don't land on the 404 error page.

When you remove a topic using the Delete refactoring, you can select the new target for the removed topic's URL, and Writerside automatically creates a redirection rule for you and references it from the toc-element that should serve as the new target for the invalid URL.

Redirection rules are stored in the redirection-rules.xml file and have the following syntax:

<rule id="36921bf6"> <description>Created after removal of "Introduction" from Writerside</description> <accepts>introduction.html</accepts> </rule>

The accepts-web-file-names attribute is added to the toc-element that you select as a target:

<toc-element topic="Topics.topic" accepts-web-file-names-ref="36921bf6"> </rule>

Sometimes, you need to add redirects manually, for example, if you change a topic's filename and ID as page URLs are generated from IDs and the old link will no longer be valid.

Set a redirect manually

  1. Open the .tree and locate the toc-element that should serve as the new target for a removed topic or that references a file whose ID has been changed.

  2. Add the accepts-web-file-names attribute to this toc-element and specify the HTML filename of the removed/renamed topic as its value like in the example below:

    <toc-element topic="Manage_TOC.topic" accepts-web-file-names="Old_topic.html"/>

    If you want this toc-element to serve as a target for several removed topics, you can add multiple HTML filenames separated by commas, or manually create a redirection rule and reference it from the .tree file to avoid cluttering it with a long list of web filenames.

Set up a redirect to an external link

When you remove a topic, you can place a redirect to an external resource if there's no existing topic that you want readers to land on. For example, this can be a knowledge base article, a blog post, or a page in your learning center.

  • Place the link to the external resource into the target-for-accepts-web-file-names attribute of the toc-element.

    <toc-element toc-title="Get started" target-for-accept-web-file-names="https://www.example.com/learning-center/">
Last modified: 28 July 2023