刚在OSX上安装了MAMP,当我导航到我在Windows上制作的任何蛋糕应用程序时,我收到服务器错误,
The website encountered an error while retrieving http://localhost:8888/myApp. It may be down for maintenance or configured incorrectly.
我没有使用本机根文件夹,而是使用/public/sites
我在本地主机上查看普通的 php 页面没有问题,问题似乎只存在于尝试查看蛋糕应用程序时。这似乎与 wamp 上未启用的 mod 重写类似错误,但我检查了 httpd.conf 文件,MAMP/conf/apache/httpd.conf
似乎很好。
LoadModule rewrite_module modules/mod_rewrite.so is not commented out.
谢谢
将Options +FollowSymLinks
添加到根 .htaccess:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
导航到
app/webroot/index.php并将webroot路径从Windows位置更改为新的OSX路径。