How do I remove a redirect?

Version 3.1 by Gunter Ohrner on 2019/06/26

Introduction

A page representing (or containing) a "redirect" will automatically forward you to a different URL if you try to open it.

As you're immediately redirected from such a page, removing or editing the redirect requires specific procedures.

Modifying or deleting the different types of automatic redirects XWiki supports require different approaches.

Removing Macro-based Redirects

Removing Macro-based redirects again, once added, can prove to be difficult if your default editor is the WYSIWYG CKeditor. In this case, the macro will even be executed in edit mode, redirecting you do to the target page before you have a chance to remove or alter the redirect.

So if your default editor is the WYSIWYG editor, and you want to edit a redirect on the following page:

https://xwiki.example.org/xwiki/bin/view/Main/

You manually have to change the URL as follows:

https://xwiki.example.org/xwiki/bin/edit/Main/?editor=wiki

This will cause the wiki text editor to open with the page's source code and the redirect can be edited or removed without any problems, even if your default editor is the WYSIWYG / CK editor.

Removing XWiki.RedirectClass Based Redirects (e.g. Automatically Generated Redirects)

When moving/renaming pages, you have the option to create redirects for the old location so that users hitting the old page would be redirected to the new location.

However, we're currently missing a Redirect Management UI to be able to see all redirects and perform actions on them, such as removing some redirects.

While waiting for a proper Redirect Management UI, here's a workaround:

Here's an example from xwiki.org:

redirectclass.png

Another option to delete a redirect page is to hand-craft the delete URL manually (find the view URL and replace view by delete) but this is more complex and you'd need to understand the Standard URL Format.

Get Connected