我在本地机器上安装了XAMPP。 我把蛋糕放在文件夹蛋糕中的htdocs中。 当我点击url localhost / cake /它寻找蛋糕控制器丢失。 为此,我试图改变文件夹中的.htaccess文件,如许多建议的那样
<IfModule mod_rewrite.c> RewriteEngine on RewriteBase /cake RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L] </IfModule>但这没有帮助。 请指导我如何解决这个问题我必须为其他工作维护更多文件夹我不能把蛋糕放在root中。 谢谢
I have XAMPP installed om my local machine. I have put cake in htdocs in a folder cake. when i hit url localhost/cake/ it seeks cake controller missing. for this i have tried to change .htaccess file in the folder as suggested by many as
<IfModule mod_rewrite.c> RewriteEngine on RewriteBase /cake RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L] </IfModule>But this is not helping. Please guide me how to solve this i have to maintain more folder for other works i can't put cake in root. Thanks
最满意答案
无需更改或更新文件夹中的任何.htaccess文件,只需在core.php对此行进行注释即可
//Configure::write('App.baseUrl', env('SCRIPT_NAME'));这解决了这个问题。 保留所有.htaccess文件。 希望这也能帮助别人。
No need to change or update any .htaccess file in the folder just have to comment this line in core.php
//Configure::write('App.baseUrl', env('SCRIPT_NAME'));and this solves the problem. Leave all the .htaccess files as it as. Hope this will help others too.
更多推荐
发布评论