Tag Archives: robots.txt

mediawiki页面伪静态配置调试

简单mediawiki页面伪静态配置: 最简单的莫过于把LocalSettings.php中添加一句$wgUsePathInfo = true;啦这样默认的连接是”http://wiki.clin003.com/index.php/首页”,这种链接用的也很普遍的,并且还没有发现什么问题。 自定义mediawiki页面伪静态配置: 链接样子“http://wiki.clin003.com/wiki/%E9%A6%96%E9%A1%B5”(这是首页的链接)。 配置方法为: 首先建立一个.htaccess文件,内容为: ##安装路径在子目录!! RewriteEngine on RewriteRule index.htm /e/index.php ##这里需要在根目录建一个index.htm的空文件 RewriteRule wiki/(.+) /e/index.php/$1 ##主要这里解决的搜索没结果问题,和下边的重复有点混乱ing RewriteRule wiki/(.+) /e/index.php?title=$1 推荐使用的.htaccess文件内容(来自官方文档): PS:使用这个你就不用在根目录建index.htm空文件啦 ##http://www.mediawiki.org/wiki/Manual:Short_URL/wiki/Page_title_–_no_root_access Options FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^wiki/(.*)$ e/index.php?title=$1 [PT,L,QSA] RewriteRule … Continue reading

Posted in Wiki支持, 今日一点, 搜索引擎 | Tagged , , , , | Leave a comment