2009-07-10 17 views
0

セットアップしたUbuntuサーバーで.htaccessファイルを有効にしようとしています。私は私のブラウザでページを表示しようとする今、私は500内部サーバーエラーを取得問題を有効にする.htaccess

<VirtualHost *:80> 
    ServerAdmin [email protected] 

    DocumentRoot /var/www/document_root 
    <Directory /> 
     Options FollowSymLinks 
     AllowOverride None 
    </Directory> 
    <Directory /var/www/document_root> 
     Options Indexes FollowSymLinks MultiViews 
     AllowOverride All 
     Order allow,deny 
     allow from all 
    </Directory> 

    [unnecessary config code omitted] 

</VirtualHost> 

<VirtualHost *:80> 
    ServerAdmin [email protected] 

    DocumentRoot /var/www 
    <Directory /> 
     Options FollowSymLinks 
     AllowOverride None 
    </Directory> 
    <Directory /var/www> 
     Options Indexes FollowSymLinks MultiViews 
     AllowOverride None 
     Order allow,deny 
     allow from all 
    </Directory> 

    [unnecessary config code omitted] 

</VirtualHost> 

:私は、サイトからファイルを変更しました。私の問題が何であるか、どんな考えですか?助けてくれてありがとう。ここで

EDIT

は私の.htaccessファイルです:

RewriteEngine on 
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico) 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ /index.php/$1 [L] 

要求されるように、私はapacheのエラーログをチェックし、エラーが記録されているように見えるです:

[ Fri Jul 10 19:39:12 2009] [アラート] [クライアント192.168.1.1] /var/www/document_root/.htaccess: 無効なコマンド「RewriteEngine」、 は、おそらくサーバー 設定

+0

おそらく、.htaccessファイルに構文エラーがあります。 .htaccessファイルの内容を提供し、エラーログ(/var/log/apache2/error.log)を見てください。 –

答えて

1

フンに含まれていない モジュールによってスペルミスまたは定義された...私はmod_rewriteのが有効になっていませんでした。私は馬鹿だと感じる。

+0

私はいつもの内容を書き換えます。は私の書き換えをブロックします。今私はちょっと好奇心が強いです...もし私があなたの靴の中にいたとしたら、書き換えが有効になっていないことがわかりましたか? –