2013-01-08 11 views
0

내 서버에 'dokuwiki'를 설치했습니다.
/usr/share/wiki 폴더에 저장됩니다.
경로가 /usr/share/wiki/doku.php왜이 .htaccess가 작동하지 않습니까?

내가 액세스했을 때 http://example.com/wiki/start에 404가 없습니다.

.htaccess의 문제점은 무엇입니까? 뭔가 잘못 RewriteBase와 함께이 있다면
나는 의심

htaccess로

## Enable this to restrict editing to logged in users only 
  
## You should disable Indexes and MultiViews either here or in the 
## global config. Symlinks maybe needed for URL rewriting. 
#Options -Indexes -MultiViews +FollowSymLinks 
  
## make sure nobody gets the htaccess files 
<Files ~ "^[\._]ht"> 
    Order allow,deny 
    Deny from all 
    Satisfy All 
</Files> 
  
## Uncomment these rules if you want to have nice URLs using 
## $conf['userewrite'] = 1 - not needed for rewrite mode 2 
RewriteEngine on 
# 
## Not all installations will require the following line.  If you do, 
## change "/dokuwiki" to the path to your dokuwiki directory relative 
## to your document root. 
RewriteBase /wiki 
# 
## If you enable DokuWikis XML-RPC interface, you should consider to 
## restrict access to it over HTTPS only! Uncomment the following two 
## rules if your server setup allows HTTPS. 
RewriteCond % !=on 
RewriteRule ^lib/exe/xmlrpc.php$      https://%% [L,R=301] 

RewriteRule ^_media/(.*)              lib/exe/fetch.php?media=$1  [QSA,L] 
RewriteRule ^_detail/(.*)             lib/exe/detail.php?media=$1  [QSA,L] 
RewriteRule ^_export/([^/]+)/(.*)     doku.php?do=export_$1&id=$2  [QSA,L] 
RewriteRule ^$                        doku.php  [L] 
RewriteCond %       !-f 
RewriteCond %       !-d 
RewriteRule (.*)                      doku.php?id=$1  [QSA,L] 
RewriteRule ^index.php$               doku.php 

등/당신의 로컬 호스트에서 정상적으로 작동 아파치/conf.d

# enter the following in pico 
Alias /wiki/ "/usr/share/wiki/" 
Alias /wiki "/usr/share/wiki/" 
<Directory "/usr/share/wiki/" > 
    Options Indexes FollowSymLinks MultiViews 
    AllowOverride None 
    Order allow,deny 
    Allow from all 
    Deny from none 

</Directory> 

답변

1
#Fix Rewrite 
Options -Multiviews 


# Mod Rewrite 
Options +FollowSymLinks 
RewriteEngine On 
RewriteBase/
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /index.php [L] 

또는 사용 줄은 ..

+0

전체 코드를 .htaccess로 대체 하시겠습니까? – Foo

+0

여전히 동일합니다 ... – Foo

+0

이 부분을 확인해 주시겠습니까? https://www.dokuwiki.org/rewrite – Foo

0

?

예인 경우 호스트 서버에 따라 .htaccess을 수정해야합니다.

여러 번 호스팅 서버가 하나 이상의 사이트를 호스팅 할 수 있기 때문입니다. 그리고 그들은 서로 다른 .htacces을 가지고 있습니다. 마지막

RewriteRule ^(.*)$ index.php/$1 [PT,L] 

지연에 대한 유감의 아래

+0

이 VPS에 그래 나는 내가 너무 다른 폴더에 다른 htaccess로 사용하고 루트 authirity 있습니다. – Foo

+0

** RewriteBase **에서 위키를 제거하고 다시 시도하십시오 .. 확실하지는 않지만 도움이 될 수 있습니다. – KAsh

+0

지금 시도했습니다. '찾을 수 없습니다. 요청한 URL/wiki/염소가이 서버에서 발견되지 않았습니다.' – Foo

관련 문제