私は Windows で作業しており、mod_rewrite エンジンがオフになっています。だから私のcakephpプロジェクトはそれでうまくいきますが、今はUBuntuに移行し、mod_rewriteエンジンがオンになっています。私のプロジェクトは、css イメージとその他のリソースのエラーが見つかりませんで終了します。私の mod_rewrite エンジンがオンで、プロジェクトを正しく実行したい場合、どのような変更を行う必要がありますか? Cakephp の 2.3 バージョンを使用しています。
プロジェクト/アプリ/index.php
require 'webroot' . DIRECTORY_SEPARATOR . 'index.php';
プロジェクト/アプリ/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
project/app/webroot/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
エラーは
"NetworkError: 404 Not Found - http://localhost/project/css/citynightlife/bootstrap.min.css"
"NetworkError: 404 Not Found - http://localhost/project/css/citynightlife/menu/styles/lwhite.css"
このネットワーク エラーは、すべての css、js、およびイメージで発生します。