Short URL with no root access steps produce no Mediawiki
From Project:Support desk
Manual:Short URL/wiki/Page title -- no root access gives instructions that don't work for me at ICDSoft. If somebody will step me through the fix, I will fix the steps at the page.
I added the required lines to .htaccess in the web root and to LocalSettings.php in the Mediawiki root.
The .htaccess additions did nothing at all. The LocalSettings.php additions made it so that when I browsed from front page to the "w" folder, the URL changed to "wiki/Main_Page", but the page displayed no change (it still displayed the front page).
My configuration:
home/aaajack/www/www/index.php Web root path home/aaajack/www/www/en/w/index.php Mediawiki path
My .htaccess additions:
RewriteRule ^en/wiki/(.*)$ /en/w/index.php?title=$1 [PT,L,QSA] RewriteRule ^en/wiki/*$ /en/w/index.php [L,QSA]
My LocalSettings additions:
$wgScriptPath = "/en/w"; # Physical path (right part of first rewrite rule). $wgArticlePath = "/en/wiki/$1"; # Virtual path (left part of first rewrite rule). MUST be DIFFERENT from the path set above ($wgScriptPath)! $wgUsePathInfo = true;
The ICDSoft tech support folks told me to put the .htaccess additions before my other additions, like this:
# Mediawiki Short_URLs per
# http://www.mediawiki.org/wiki/Manual:Short_URL/wiki/Page_title_--_no_root_access
RewriteRule ^en/wiki/(.*)$ /en/w/index.php?title=$1 [PT,L,QSA]
RewriteRule ^en/wiki/*$ /en/w/index.php [L,QSA]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [L]
RewriteRule ^.*$ index.php [L]
That made the steps work. I will note it.