【发布时间】:2020-06-24 03:25:43
【问题描述】:
所以,它在我的本地上运行良好,但是当部署在 cPanel 上时出现该错误, 答案是完美的.. 但是有 404 状态... 并且在本地它带有 200 状态,因为它应该
所以我假设是一个 .htaccess 的东西
这是我项目根目录中的 .htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ /$1 [L]
RewriteRule (^[^/]*$) public/$1 [L]
</IfModule>
这是 my_project/public 中的那个
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]
</IfModule>
提前感谢您的帮助
【问题讨论】:
标签: php api .htaccess http-status-code-404 slim