繁体   English   中英

cakephp 3 baseUrl已启用缺少控制器

[英]cakephp 3 baseUrl enabled missing controller

在app.php中说:

* - baseUrl - To configure CakePHP to *not* use mod_rewrite and to
     *   use CakePHP pretty URLs, remove these .htaccess
     *   files:
     *      /.htaccess
     *      /webroot/.htaccess
     *   And uncomment the baseUrl key below.

但是当我取消注释//'baseUrl' => env('SCRIPT_NAME'),控制器丢失错误。

请创建htaccess文件并编写以下代码

<IfModule mod_rewrite.c>
 RewriteEngine on
 RewriteRule    ^$ app/webroot/    [L]
RewriteRule    (.*) app/webroot/$1 [L]
</IfModule>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM