Reprinted from: http://hi.baidu.com/chenshake/blog/item/25d08f4565a9fb3787947399.html
The following figure shows the mediawiki configuration. The version is 1.14. After I get familiar with wiki, I will use wiki to write these documents for convenience.
1: images can be uploaded.
By default, Images cannot be uploaded. You need to modify localsettings. php
81 $ wgenableuploads = false;
Change false to true.
However, when you upload files, you will still be prompted that the upload directory (public) has no permission. How can you set this directory. Different Versions of mediawiki seem to be different. Many documents are different.
79 ## to enable image uploads, make sure the 'images' directory
80 ## is writable, then set this to true:
81 $ wgenableuploads = true;
After reading the annotations, you can simply set the image directory to be readable and written.
Chmod 777 images/
At this time, you can upload attachments.
$ Wguploadpath is no longer available. It should be a version upgrade and canceled.
Set
94 # $ wghasheduploaddirectory = false;
If it is set to true, all your images will be in different directories of the image. Depending on your needs, if you have a lot of images. It is estimated that it must be enabled.
Ii. Anonymous editing not allowed
Edit the defaultsettings. php file.
1168 # $ wggrouppermissions ['*'] ['edit'] = true;
1169 $ wggrouppermissions ['*'] ['edit'] = false;
1170 $ wggrouppermissions ['user'] ['edit'] = true;
3. Close the registration page
$ Wggrouppermissions ['*'] ['createaccount'] = false;
At this time, you cannot register. It should be enough.
Modify short URL
To be honest, I don't know the principles of pseudo-static and rewrite, but I only know the reference documentation. The following process is really stupid, but you can do it.
/Var/www/mediawiki-1.14.0
Originally my directory was a mediawiki-1.14.0, and I changed folder to W in order to do it as an example.
Modify the localsettings. php. file in the/W directory:
$ Wgscriptpath = "/W ";
$ Wgarticlepath = "/wiki/$1 ";
$ Wgusepathinfo = true;
Modify the. htaccess file in the root directory:
Rewriteengine on
Rewriterule ^ wiki/(. *) $/W/index. php? Title = $1 [PT, L, QSA]
Rewriterule ^ wiki/* $/W/index. php [L, QSA]
# Rewriterule ^/* $/W/index. php [L, QSA]
Remarks
Assume that mediawiki is installed in a directory such as/W (the/wiki directory cannot be used; otherwise, conflict occurs)