More actions
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
<syntaxhighlight lang="Apache"> | <syntaxhighlight lang="Apache"> | ||
RewriteEngine On | RewriteEngine On | ||
RewriteBase / | RewriteBase / | ||
Line 24: | Line 21: | ||
RewriteCond %{REQUEST_FILENAME} !-d | RewriteCond %{REQUEST_FILENAME} !-d | ||
# Root path plus anything rewrite to article | # Root path plus anything rewrite to article | ||
RewriteRule ^( | RewriteRule ^(.*)$ mediawiki/index.php?title=$1 [L,QSA] | ||
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 23:45, 15 September 2024
RewriteEngine On
RewriteBase /
# Redirect if old w short path
RewriteRule ^w/(.*)$ /$1 [R=301,L]
# Redirect if old wiki path
RewriteRule ^wiki/(.*)$ /$1 [R=301,L]
# Sitemap moved fix
RewriteRule ^sitemap.xml*$ mediawiki/sitemap.xml [PT,L,QSA]
# Root path rewrite to main page
RewriteRule ^$ mediawiki/index.php [PT,L,QSA]
# Ignore if file exists
RewriteCond %{REQUEST_FILENAME} !-f
# Ignore if directory exists
RewriteCond %{REQUEST_FILENAME} !-d
# Root path plus anything rewrite to article
RewriteRule ^(.*)$ mediawiki/index.php?title=$1 [L,QSA]