S
S
sidex1002013-07-10 18:39:49
Link Shortening
sidex100, 2013-07-10 18:39:49

How to make links to the root on the mediawiki engine?

Greetings to all readers of the q&a section.
To my shame, I could not solve the following problem for myself:
http_://example.com/Main_page As far as I understand, to implement the insidious plan, the ShortUrl

plugin is called to get rid of all kinds of “wiki” and “w” . I carefully read the instructions on the off. site, as well as all sorts of manuals on this topic. Maybe someone faced a similar task and could bring their .htaccess settings and their corresponding ones to LocalSettings.php? And the main question for those who managed to implement this setup, with this configuration, the engine itself must be installed not in [document root], but inside the directory: [document root]\wiki?


These questions are addressed primarily to those who have faced this kind of task. There are a lot of wikis on the Internet configured in this way, but it seemed to me that there is no clear instruction on how to .

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
sidex100, 2013-07-10
@sidex100

For posterity:
the engine is installed in document_root/wiki/
.htaccess:

DirectoryIndex /wiki/index.php

RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/wiki/index.php [L]

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^/?wiki/images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/wiki/thumb.php?f=$1&width=$2 [L,QSA,B]

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^/?wiki/images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/wiki/thumb.php?f=$1&width=$2&archived=1 [L,QSA,B]

document_root/wiki/LocalSettings.php:
$wgScriptPath = "/wiki";
$wgScriptExtension = ".php";
$wgArticlePath = "/$1";
$wgEnableUploads  = true;
$wgGenerateThumbnailOnParse = false;

Made in the Redwerks plugin .
Thanks again Abcd_Efgh !

A
Abcd_Efgh, 2013-07-10
@Abcd_Efgh

The ShortURL extension simply provides the ability to give users short links to articles. The wiki can help with the configuration of the removal, for example, a plugin from Redwerks or the corresponding manual on mediawiki.org.

A
akral, 2013-07-10
@akral

Described in the official documentation .

A
alekseikolotilov, 2015-01-15
@alekseikolotilov

When editing, the following URL appears /w//index.php?title=Page&action=edit
/w/ is the mediawiki installation path
How to make it /index.php?title=Page&action=edit

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question