蛋糕php罐';无法正确读取url
我刚买了一个新的专用服务器,使我的网站内 我的网站是用cake php和debian服务器创建的 当我查看我的网站www.example时。com它让我拿出html css和流,但图像不显示 加载资源失败:服务器响应状态为404(未找到) 该文件存在于/webroot/img中/蛋糕php罐';无法正确读取url,php,cakephp,url-rewriting,debian,Php,Cakephp,Url Rewriting,Debian,我刚买了一个新的专用服务器,使我的网站内 我的网站是用cake php和debian服务器创建的 当我查看我的网站www.example时。com它让我拿出html css和流,但图像不显示 加载资源失败:服务器响应状态为404(未找到) 该文件存在于/webroot/img中/ 该站点正在/app中编辑您的.htaccess文件,以便执行此操作 <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^$ app
该站点正在/app中编辑您的.htaccess文件,以便执行此操作
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
重新启动发动机
重写规则^$app/webroot/[L]
重写规则(*)app/webroot/$1[L]
有关更多详细信息,请阅读食谱。检查是否启用了mod_rewrite?如何检查?在unix中?如果是apache,请尝试phpinfo(),并查看“加载的模块”部分中是否有mod_rewrite,如果“加载的模块”中存在mod_rewrite,则检查目录的所有前置命令是否正确
1. Make sure that an .htaccess override is allowed and that
AllowOverride is set to All for the correct DocumentRoot.
2. Make sure you are loading mod_rewrite correctly.
3. Make sure your copy of CakePHP comes from the downloads section of
the site or our Git repository, and has been unpacked correctly, by
checking for .htaccess files.