====== SimpleForward Plugin ====== ---- plugin ---- description: Forwards non-existent pages to another local website. author : Michal Koutný email : michal@fykos.cz type : action lastupdate : 2014-10-14 compatible : 2014-09-29 depends : conflicts : similar : tags : redirect, 404 downloadurl: https://github.com/fykosak/dokuwiki-plugin-simpleforward/zipball/master bugtracker : https://github.com/fykosak/dokuwiki-plugin-simpleforward/issues sourcerepo : https://github.com/fykosak/dokuwiki-plugin-simpleforward/ donationurl: screenshot_img : ---- This plugin forwards all requests to non-existent Dokuwiki pages to an underlying website. Motivation for this is gradual transition of the website from original application to Dokuwiki. ===== Installation ===== Plugin is by default disabled so installation should be without any problems. Before enabling the plugin be sure you have correctly set path to the underlying website. :!: If your underlying website uses some redirections via ''.htaccess'' you have to port these redirections to Dokuwiki's ''.htaccess''. ===== Usage ===== If you need to access Dokuwiki, add following GET parameters: * ''dokuwiki_simpleforward=0'', * (''do=edit'' when you need to create the page). This would temporarily disable the plugin and you can e.g. create the Dokuwiki page. ==== Example ==== ''example.net/bigpage/subpage/subsubpage?dokuwiki_simpleforward=0&do=edit'' will enable you to create //subsubpage//. ===== Configuration and Settings ===== --- [[user>hh lohmann|hh lohmann]] //2014-11-14 17:00//: being not sure if I understand the plugin's whole story the following makes it work: * Section **Simpleforward** in the [[plugin:config| Config Manager]]: * //plugin simpleforward document root// => the **filesystem** root directory for the site to use: * e.g.: ''/my_path/htdocs/'' * you may leave the final ''/'', but it has to be a directory * //plugin simpleforward enabled// * (self explaining) * //plugin simpleforward index// => the **filesystem** file (with possible path) to serve "file not found": * relative to the above given //simpleforward document root// * e.g.: ''errMessages/myPersonal404.FILE_EXTENSION'' * with FILE_EXTENSION = ''php'' the file will be handed over to PHP, with any other extension simpleforward directly outputs its content - this is important for the "DokuWiki page" usage as stated next * **Example:** forwarding any "file not found" to your DokuWiki start page: * //plugin simpleforward document root//: ''/my_path/doku/'' * //plugin simpleforward enabled//: (checked) * //plugin simpleforward index//: ''doku.php'' * **Answering with a specially tailored DokuWiki page to serve for "file not found"**, allowing editing and access rights by DokuWiki (i.e. as esp. editors are used to) * Since //plugin simpleforward index// must be file in the filesystem you cannot use a DokuWiki page call like "doku.php?id=errMessages/myPersonal404", but you can achieve something nearly equivalent by setting //plugin simpleforward document root// to your DokuWiki filesystem root and one of the following: * Set //plugin simpleforward index// to doku.php and add / edit some simpleforward mechanismn in your ":start" page with DokuWiki * Set //plugin simpleforward index// to a filesystem file corresponding to a DokuWiki page and edit it with DokuWiki, e.g. setting like ''data/pages/errMessages/myPersonal404.txt'' and editing ''doku.php?id=errMessages:myPersonal404''. Note that you cannot use any DokuWiki markup or plugins etc.((and no PHP, of course)) in "myPersonal404" that way, but you have full HTML power (including client side means like Javascript) to create some information and do further (more sophisticated) forwarding, for instance something like((this is meant as a short example, not as an HTML tutorial, i.e. don't blame rough coding))

Page not found

Do you want to go to the Start Page?

* **:!: Be aware: If you have activated simpleforward successfully (i.e. with valid "document root" and "index") you MUST provide something on your defined "index" to allow for "simpleforward exceptions" so that you are able to create new DokuWiki pages** (incorporating e.g. "&do=edit&dokuwiki_simpleforward=0", see above)