Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, add.com@phpstudy and inform them of the time the error occurred, and anything you might have done that may have caused the error
出现这种错误的原因可能有三种
1.入口文件未找到,或者入口文件里面引入的启动文件没找到或者路径出错。
2.hataccess文件出错
thinkphp一般是修改成如下:
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>
在 RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] 的index.php 后面加上‘?’即可
3.apache里重写未开启
在apache配置文件httpd.conf中搜索
AllowOverride None
然后改为AllowOverride All
然后在找到
LoadModule rewrite_module modules/mod_rewrite.so
把这个前面的“#”号去掉,就是去掉注释,然后重启apache.搞定!
如果没有的找到“LoadModule rewrite_module modules/mod_rewrite.so”,查找“LoadModule ”,在这个集中地区域加上“LoadModule rewrite_module modules/mod_rewrite.so”即可!