How do I remove a redirect?

Version 4.1 by Vincent Massol 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 Scripting Redirects

Removing scripting redirects again, once added, can prove to be difficult if your default editor is the WYSIWYG editor. In this case, the script 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, append ?editor=wiki to the URL. For example if the page is:

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

Then 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.

Alternatively, you can switch your user to be an Advanced User and then edit in wiki mode.

Removing XObject Redirects

These are redirects implemented by adding an XObject of class XWiki.RedirectClass.

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. When doing so, XWiki adds an XObject of class XWiki.RedirectClass to the page.

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