MediaWiki:Short Link: Difference between revisions
Appearance
Created page with "===/$=== *.htaccess RewriteEngine On RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/index.php [L] RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d RewriteRule ^/?images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2 [L,QSA,B] RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f RewriteCond..." |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 20: | Line 20: | ||
## defaults for all runtime URL paths are based off of this. | ## defaults for all runtime URL paths are based off of this. | ||
## For more information on customizing the URLs please see: | ## For more information on customizing the URLs please see: | ||
## http://www.mediawiki.org/wiki/Manual:Short_URL | ## <nowiki>http://www.mediawiki.org/wiki/Manual:Short_URL</nowiki> | ||
$wgScriptPath = ""; | $wgScriptPath = ""; | ||
$wgScriptExtension = ".php"; | <span style="color:#ff0000">$wgScriptExtension = ".php"; | ||
$wgArticlePath = "/$1"; | $wgArticlePath = "/$1"; | ||
$wgUsePathInfo = true; | $wgUsePathInfo = true;</span> | ||
===/wiki/$=== | ===/wiki/$=== | ||
| Line 45: | Line 45: | ||
## defaults for all runtime URL paths are based off of this. | ## defaults for all runtime URL paths are based off of this. | ||
## For more information on customizing the URLs please see: | ## For more information on customizing the URLs please see: | ||
## http://www.mediawiki.org/wiki/Manual:Short_URL | ## <nowiki>http://www.mediawiki.org/wiki/Manual:Short_URL</nowiki> | ||
$wgScriptPath = ""; | $wgScriptPath = ""; | ||
$wgScriptExtension = ".php"; | <span style="color:#ff0000">$wgScriptExtension = ".php"; | ||
$wgArticlePath = "/wiki/$1"; | $wgArticlePath = "/wiki/$1"; | ||
$wgUsePathInfo = true; | $wgUsePathInfo = true;</span> | ||
==Source== | ==Source== | ||
Latest revision as of 18:33, 14 February 2022
/$
- .htaccess
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/index.php [L]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^/?images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2 [L,QSA,B]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^/?images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2&archived=1 [L,QSA,B]
- LocalSettings.php
## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
## For more information on customizing the URLs please see:
## http://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath = "";
$wgScriptExtension = ".php";
$wgArticlePath = "/$1";
$wgUsePathInfo = true;
/wiki/$
- .htaccess
RewriteEngine On
RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/index.php [L]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^/?images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2 [L,QSA,B]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^/?images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2&archived=1 [L,QSA,B]
- LocalSettings.php
## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
## For more information on customizing the URLs please see:
## http://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath = "";
$wgScriptExtension = ".php";
$wgArticlePath = "/wiki/$1";
$wgUsePathInfo = true;