我使用xampp在yii2的 localhost 中建立了我的网站,它没有问题。
但是现在上传我在linux主机上的网站后,我得到了以下错误:
Forbidden
You don't have permission to access /index.php on this server.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
这是我的htaccess内容:
RewriteEngine on
# If a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
为什么会出现这个错误?
答案 0 :(得分:1)
如果您使用的是cpanel / WHM,则可以通过文件管理器更改权限。如果它仍然不适合你,那么删除index.php并上传一个新的。
另外,检查文档根目录中的.htaccess是否有任何错误。