Loading...

yii2部署nginx

页面全部提示404,
nginx平台下需要额外配置yii rewrite规则,配置如下: 在nginx 的配置文件nginx.conf //增加部分 location / { # Redirect everything that isn't a real file to index.php try_files $uri $uri/ /index.php?$args; } 重启nginx服务 //路由优化 'components' => [ 'urlManager' => [ 'class' => 'yii\web\UrlManager', 'enablePrettyUrl' => true, 'showScriptName' => false, ], ]

 

原文链接:https://www.cnblogs.com/huay/p/10734859.html
本文来源 互联网收集,文章内容系作者个人观点,不代表 本站 对观点赞同或支持。如需转载,请注明文章来源,如您发现有涉嫌抄袭侵权的内容,请联系本站核实处理。

© 版权声明

相关文章