0
我在我的網站上安裝了mediawiki。我遇到了一個問題,我的wiki頁面以www.mywebsite/mywiki/index.php/mywikipage開頭。我想擺脫這個「index.php」,所以我做了簡短的網址到我的維基與這個網站:http://shorturls.redwerks.org/。從這裏我得到了一個代碼爲.htaccess:Index.html不是我的默認頁面(不知何故,我的wiki覆蓋了它)
DirectoryIndex RewriteEngine On
RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/w/index.php [L]
RewriteRule ^/?$ %{DOCUMENT_ROOT}/w/index.php [L]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^/?w/images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/w/thumb.php?f=$1&width=$2 [L,QSA,B]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^/?w/images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/w/thumb.php?f=$1&width=$2&archived=1 [L,QSA,B]
而另什麼去的LocalSettings.php在我的wiki文件夾:
## 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 = "/w";
$wgScriptExtension = ".php";
$wgArticlePath = "/wiki/$1";
$wgUsePathInfo = true;
## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = true;
$wgGenerateThumbnailOnParse = false;
此後,我與我的Wiki的URL沒有更多的問題頁面。但我的網站首頁現在轉到wiki。我希望它回到index.html。我試圖把這個代碼放到我的.htaccess文件中,但仍然不起作用。
Options +FollowSymlinks
RewriteEngine on
RewriteBase/
DirectoryIndex index.html
任何幫助將是偉大的!謝謝!
它沒有幫助。另外當我想點擊我的wiki頁面時,它給了我這個:http://i.imgur.com/ZC2hgaQ.png 這是我的實際網站(沒有造型和其他視覺的東西)。 – Matt