To set 'pretty' URL paths for actions other than
plain page views, add to this array. For instance:
'edit' => "$wgScriptPath/edit/$1"
There must be an appropriate script or rewrite rule
to handle these URLs.
$wgUploadBaseUrl = "";
/**#@-*/
+/**
+ * To set 'pretty' URL paths for actions other than
+ * plain page views, add to this array. For instance:
+ * 'edit' => "$wgScriptPath/edit/$1"
+ *
+ * There must be an appropriate script or rewrite rule
+ * in place to handle these URLs.
+ */
+$wgActionPaths = array();
+
/**
* If you operate multiple wikis, you can define a shared upload path here.
* Uploads to this wiki will NOT be put there - they will be put into
if ( $query == '' ) {
$url = str_replace( '$1', $dbkey, $wgArticlePath );
} else {
+ if( preg_match( '/^(.*&|)action=([^&]*)(&(.*)|)$/', $query, $matches ) ) {
+ global $wgActionPaths;
+ $action = urldecode( $matches[2] );
+ if( isset( $wgActionPaths[$action] ) ) {
+ $query = $matches[1];
+ if( isset( $matches[4] ) ) $query .= $matches[4];
+ $url = str_replace( '$1', $dbkey, $wgActionPaths[$action] );
+ if( $query != '' ) $url .= '?' . $query;
+ return $url;
+ }
+ }
if ( $query == '-' ) {
$query = '';
}