Editing
User talk:Planetoid
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== 請教mediawiki url的省略問題 == 您好!我想把wiki url中的index.php去掉,於是改寫了localsetting.php以及.htaccess文件,所有的詞倏都已經成功重置,但是註冊和登陸的鏈接不能正確重置。請問您可以幫助我嗎?[[用戶:QienKuen|QienKuen]] 03:16 2007年十二月20日 (EST) * QienKuen: 能否張貼一下設定值,與MediaWiki版本及作業系統? --[[用戶:Planetoid|Planetoid]] 21:25 2007年十二月20日 (EST) 好的,我的localsetting.php中相關的設定值是這樣的: <pre> $wgScriptPath = "/wiki"; $wgScriptExtension = ".php"; $wgScript = "/wiki"; $wgRedirectScript = "$wgScriptPath/redirect.php"; $wgArticlePath = "/$1"; <nowiki>##</nowiki>$wgArticlePath = "$wgScript?title=$1"; </pre> '''.htaccess文件'''是這樣設置的: <pre> RewriteEngine On RewriteBase /wiki RewriteCond %{REQUEST_URI} !^/wiki/$ RewriteCond %{REQUEST_URI} !^/wiki/(stylesheets|images|skins)/ RewriteCond %{REQUEST_URI} !^/wiki/(redirect|texvc|index).php RewriteCond %{REQUEST_URI} !^/wiki/error/(40(1|3|4)|500).html RewriteCond %{REQUEST_URI} !^/wiki/favicon.ico RewriteCond %{REQUEST_URI} !^/wiki/robots.txt RewriteCond %{QUERY_STRING} ^$ [OR] %{REQUEST_URI} ^/wiki/Special:Search RewriteRule ^(.*)$ /wiki/index.php?title=$1 [L,QSA] </pre> 我的wiki是安裝在根目錄下的“'''wiki'''”目錄中,因為根目錄下還有其它站點,不可以裝在根目錄中。<br/> mediawiki是用1.11.0,作業系統是LAMP,確定已經打開了.htaccess功能。是不是因為設定與版本不符呢?[[用戶:QienKuen|QienKuen]] 22:43 2007年十二月20日 (EST) * 我測試雖可登錄,但是特殊namespace會出問題。 另外找時間再參考官方文件 [http://www.mediawiki.org/wiki/Manual:Short_URL Manual:Short URL]。 --[[用戶:Planetoid|Planetoid]] 12:38 2007年十二月21日 (EST)
Summary:
Please note that all contributions to LemonWiki共筆 are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
LemonWiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
User page
Discussion
English
Views
Read
Edit
Add topic
View history
More
Search
Navigation
Main page
Current events
Recent changes
Random page
Help
Categories
Tools
What links here
Related changes
User contributions
Logs
View user groups
Special pages
Page information