====== redirect plugin ====== ---- plugin ---- description: Redirects page accesses to other pages or external sites using a central configuration file. author : Andreas Gohr email : andi@splitbrain.org type : action, admin lastupdate : 2010-06-13 compatible : 2009-12-25 depends : conflicts : similar : tags : redirect downloadurl: http://github.com/splitbrain/dokuwiki-plugin-redirect/zipball/master sourcerepo : http://github.com/splitbrain/dokuwiki-plugin-redirect/ bugtracker : http://github.com/splitbrain/dokuwiki-plugin-redirect/issues donationurl: http://donate.dokuwiki.org/redirect ---- ===== Download and Installation ===== Download and install the plugin using the [[plugin:plugin|Plugin Manager]] using the download link given above. Refer to [[:Plugins]] on how to install plugins manually. ===== Changes ===== {{rss>http://github.com/feeds/splitbrain/commits/dokuwiki-plugin-redirect/master date}} ===== 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 [[config:Managers]] and [[config:Superusers]]. You may tell the plugin to show an info message to users when they were redirected. This can be done in the [[config|Config Manager]]. Note: this feature only works with [[devel: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. --- [[user>jno|jno]] //2011/07/08 13:27//