Table of Contents

redirect plugin

Compatible with DokuWiki

2009-12-25

plugin Redirects page accesses to other pages or external sites using a central configuration file.

Last updated on
2010-06-13
Provides
Admin, Action
Repository
Source

Similar to 404manager, goto, mredirect

Tagged with redirect

Download and Installation

Download and install the plugin using the Plugin Manager using the download link given above. Refer to Plugins on how to install plugins manually.

Changes

Configuration/Usage

The plugin stores a list of page/redirect pairs in a config file called redirect.conf in the plugin directory. This file needs to be writable by the webserver to edit it from the administration menu.

In order to implement the redirections, just place on the redirect.conf file lists of the old pages, followed by the new ones:

old_namespace:my_page new_namespace:my_page

On this example, when the users try to access old_namespace:my_page it will be redirected to new_namespace:my_page

Access to the configuration is granted for Managers and Superusers.

You may tell the plugin to show an info message to users when they were redirected. This can be done in the Config Manager. Note: this feature only works with develonly snapshots >2010-06-13.

Comments

301 redirects

If we change the following line in inc/common.php

header('Location: '.$url);

to

header('Location: '.$url,TRUE,301);

then instead of a 302 response - the default when no $http_response_code parameter is specified in header() - we get a 301 which is supposed to be better for SEO reasons.

Is such a change, or for that matter a modification of send_redirect() so that one can optionaly specify an $http_response_code other than 302, a good idea?

Wow! It handles redirects to external URLs too!

Thanks!
But I see no way to update redirect.conf from the Config manager…
Manual editing is ok. — jnojno

2011/07/08 13:27