Manual:$wgActionPaths/de

Details
Setup and ensure it is working first Um "pretty" URL-Pfade für andere Aktionen als plain-Seitenansichten einzustellen, fügen Sie das diesem Array hinzu. Zum Beispiel:

Es muss eine entsprechendes Skript oder eine Umschreibungsregel vorhanden sein, um diese URLs zu verarbeiten.

Example configurations
These examples include sample .htaccess files for Apache servers using mod_rewrite. Other servers will have other ways of accomplishing URL rewrites.

Action paths from root
This sets up action paths of the form  etc.


 * LocalSettings.php

extra htaccess rules

 * .htaccess: Be sure to modify "/w/index.php" to where you have MediaWiki installed

Non root action paths
For standard example.com/wiki/Main_Page rewrites to example.com/wiki/view/Main_Page use above config and change this line to include "/wiki":

For standard example.com/wiki/Main_Page view urls, and rewrites to example.com/wiki/edit/Main_Page

action on the end
For standard example.com/wiki/Main_Page view urls, and rewrites to example.com/wiki/Main_Page/edit

you cannot have subpages of main pages named "delete, edit, watch, unwatch" etc from the array when setup like this.

Virtual action/ directories
This sets up URLs such as  etc.

To rewrite most actions to a specific path, one could make the following changes to :

In Apache, programmiere eine Umschreibungsregel ähnlich wie die folgende:

This will forward all requests to /action/actionword/title to MediaWiki's index.php which will parse the action and title according to your $wgActionPaths settings.

Bei der Konfiguration von Apache mod_negotation, um PHP Skripte auszuführen, sollte darauf geachtet werden, um nicht (406 Nicht akzeptable?) Fehler zu verursachen, wenn mit dieser Methode gearbeitet wird, die möglicherweise in einigen Fällen eine Verzeichnisliste aussetzen, siehe [1], [2]. See also 21617.

Spam prevention
Using $wgActionPaths, especially for the edit action seems to reduce the number of spam bots attempting article edits. It is suspected that bots are programmed to look for action=edit to identify a MediaWiki installation and act appropriately. With this in mind, it would be beneficial to name your action prefix something non-apparent so bots can't find your site when they start looking for action/edit.