2013-06-13 33 views
0

其實我的網站在本地主機上工作,爲什麼我會在現場得到Internal Server Error? 我在這裏附上了我的.htaccess這個文件,裏面有錯誤嗎?yii中的內部服務器錯誤

Options +FollowSymLinks 
    IndexIgnore */* 
    RewriteEngine on 

    # Make backend accessible via url: 
    RewriteRule ^sysadmin& backend.php 

    # if a directory or a file exists, use it directly 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteCond %{REQUEST_FILENAME} !-d 

    # otherwise forward it to index.php 
    RewriteRule ^.*$ /index.php [L] 
+0

你改變的index.php文件夾的Yii參考? –

+0

雅我已更改它 – Bharu

+0

您的託管服務提供商是否允許您使用.htaccess文件,如果有,是否安裝了mod_rewrite? – bkwint

回答

1

只是嘗試添加下面的規則在你的htaccess:

RewriteBase/
0

您應該檢查你的Apache日誌。我有同樣的問題,我檢查錯誤日誌。有一個錯誤,即無效命令「RewriteEngine」意味着重寫模塊被禁用。您必須啓用它。對於Linux:

下的Apache 2+,你可以簡單地做:

sudo a2enmod rewrite && sudo service apache2 restart 
or 
sudo a2enmod rewrite && sudo /etc/init.d/apache2 restart