.htaccess htaccess与cakephp workds一起在windows上运行,但不在ubuntu上运行
我正在Windows上工作,它关闭了mod_重写引擎。因此,我的cakephp项目在这方面工作得很好,但现在我已经转移到UBuntu,它已经启动了mod_重写引擎。我的项目以css图像和其他资源的Not found错误结束。如果我的mod_重写引擎启动,并且我想正确运行项目,我需要做什么更改?我使用的是Cakephp的2.3版本 project/app/index.php.htaccess htaccess与cakephp workds一起在windows上运行,但不在ubuntu上运行,.htaccess,ubuntu-12.04,cakephp-2.3,.htaccess,Ubuntu 12.04,Cakephp 2.3,我正在Windows上工作,它关闭了mod_重写引擎。因此,我的cakephp项目在这方面工作得很好,但现在我已经转移到UBuntu,它已经启动了mod_重写引擎。我的项目以css图像和其他资源的Not found错误结束。如果我的mod_重写引擎启动,并且我想正确运行项目,我需要做什么更改?我使用的是Cakephp的2.3版本 project/app/index.php require 'webroot' . DIRECTORY_SEPARATOR . 'index.php'; projec
require 'webroot' . DIRECTORY_SEPARATOR . 'index.php';
project/app/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
此网络错误适用于所有css、js和图像。请尝试检查etc/apache2/sites available文件夹中的虚拟主机文件。您应该在标记中将以下内容设置为All
AllowOverride All
这些css/images/js文件实际上位于文档根目录中的什么位置?
AllowOverride All