为了账号安全,请及时绑定邮箱和手机立即绑定

httpd.conf修改了之后显示下面这个错误,看了日志说是RewriteCond %{REQUSET_FILENAME}!-d无效

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at  1533750031@qq.com to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.


正在回答

2 回答

Rewritebase /index.php   可以忽略不写

0 回复 有任何疑惑可以回复我~

首先说下我用的是thinkphp3.2.3版,刚开始按照老师的流程写下来是问题,后百度解决了

第一步:

1.httpd.conf中去掉LoadModule rewrite_module modules/mod_rewrite.so 前面的#号

2.AllowOverride None 修改为了AllowOverride All(如果有两处,就都修改了吧)

(记得重启wrap服务)

二:这里不是Apache的配置文件了

(通过index.php生成的列如APP文件下的conf)

3.在config文件中添加以下配置: 

// URL地址不区分大小写

'URL_CASE_INSENSITIVE' => true,

//REWRITE模式

'URL_MODEL' => 2,


4.根目录.htaccess如果没有自己建也可以。

<IfModule mod_rewrite.c>

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

Rewritebase /index.php

RewriteRule ^(.*)$ /index.php?/$1 [L]

</IfModule>

(这第4最好是别用,我用了官方自带的.htaccess没有问题,按照老师的写下来有问题)


0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
快速入门ThinkPHP框架—理论篇
  • 参与学习       89091    人
  • 解答问题       593    个

快速入门ThinkPHP框架教程,掌握ThinkPHP的理论基础

进入课程

httpd.conf修改了之后显示下面这个错误,看了日志说是RewriteCond %{REQUSET_FILENAME}!-d无效

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号