cakephp 中的 .htaccess
我不想在 cakephp 上使用 mod_rewrite,我想使用 cakePHP 的漂亮 URL。所以我删除了所有 .htaccess 文件
- /.htaccess
- /app/.htaccess
- /app/webroot/.htaccess
上的这一行
并取消注释 core.php配置::write('App.baseUrl', env('SCRIPT_NAME')) ;
不,问题是...如果我将控制器和操作放在 URL 中,它会显示 404 未找到错误。
http://www.mydomain.com/controller/action - 显示未找到
任何人都可以帮助我出这个。
I do not want to use mod_rewrite on cakephp and I want to use cakePHP's pretty URLs. So I have removed all the .htaccess files
- /.htaccess
- /app/.htaccess
- /app/webroot/.htaccess
and uncommentted this line on core.php
Configure::write('App.baseUrl', env('SCRIPT_NAME'));
Noe the problem is...if I am putting controller and action in URL it is showing a 404 not found error.
http://www.mydomain.com/controller/action - showing not found
Can anyone help me out this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试以下任一方法:
Try either: