0
我在谷歌搜索我的問題,沒有找到任何有用的信息。htaccess不重寫Kohana中的index.php
因此,在我將網站移除給其他主機之前,一切正常。這工作得很好
# Turn on URL rewriting
RewriteEngine On
# Installation directory
RewriteBase/
# Protect hidden files from being viewed
<Files .*>
Order Deny,Allow
Deny From All
</Files>
# Protect application and system files from being viewed
RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L]
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [PT]
但當我刪除該網站到其他主機index.php不會重寫了。在主機上
Apache的版本是2.2.22,當我登錄到FTP
文件結構/ htdocs中/和站點文件。
,當我在瀏覽器
http://verana.ge/index/page
寫它給了我404錯誤
但
http://verana.ge/index.php/index/page/
作品以及
引導配置是:
'base_url' => '/', 'index_file' => FALSE,
所以請幫助我,並告訴我,如果我做錯了什麼,或者是Apache的配置問題,或者是Kohana中的問題
預先感謝您
ADDED
還有一個細節
我與我的主機系統管理員聯繫,他給我的日誌文件說
/var/www/virtual/verana.ge/htdocs/.htaccess: RewriteLog not allowed here
相同的主機,我有WordPress站點和它的htaccess文件lokes這樣和工作
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /college/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /college/index.php [L]
</IfModule>
# END WordPress
你能告訴我,請在哪裏,什麼是問題
ADDED
重寫日誌說
[verana.ge/sid#21cbdd98][rid#21e0ad78/initial] (3) [perdir /var/www/virtual/verana.ge/htdocs/] strip per-dir prefix: /var/www/virtual/verana.ge/htdocs/ ->
任何想法?
你能檢查的Apache 2.2.22作品這htaccess的conficuration如果是的.htaccess連正在運行?在某處插入一些隨機字符串,查看加載頁面時是否出現500錯誤。 – Ansari
謝謝你的回覆,是的,我有500錯誤,當我把一些隨機字符串 –
嗯,然後添加兩行來做重寫日誌記錄,看看發生了什麼。第1行:RewriteLog「/usr/local/apache/logs/rewrite.log」第2行:RewriteLogLevel 4請確保更改日誌文件的路徑,確保路徑存在並且文件存在並可由Web用戶寫入。 – Ansari