위 키 미디어 의사 정적 설정
가장 쉬 운 것 은 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 ^wiki/*$ wiki/ [L,QSA] RewriteRule ^/*$ wiki/ [L,QSA]
그리고 LocalSettings.php 편집
$wgScriptPath = “/e”; # Path to the actual files (right part of first rewrite rule). Should already be there
##mediawiki ( ) ,
##
$wgArticlePath = “/wiki/$1″; # Virtual path (left part of first rewrite rule). MUST be DIFFERENT from the path above!
## , , ( , )。
mediawiki :http://www.mediawiki.org/wiki/Manual:Short_URL#Defaults
:
robots.txt
User-agent: *
Disallow: /e/
Disallow: /wiki/Special:Search
Disallow: /wiki/Special:Random
/e/ (mediawiki ), , 。
PS: , .htaccess , , .htaccess o(∩_∩)o…
mediawiki :
from:http://easun.org/archives/wikimedia_wiki_url_short.html
1. :
mv index.php show
mv redirect.php redirect
2. .htaccess
<Files ~ (show|redirect)>
ForceType application/x-httpd-php
</Files>
DirectoryIndex show
3. LocalSettings.php $wgScript,$wgRedirectScript,$wgArticlePath
$wgScript = “$wgScriptPath/show”;
$wgRedirectScript = “$wgScriptPath/redirect”;
$wgArticlePath = “$wgScript/$1″;
mod_rewrite ,
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.