httpd.conf修改了之后顯示下面這個(gè)錯(cuò)誤,看了日志說是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.
2018-09-11
Rewritebase /index.php? ?可以忽略不寫
2017-05-09
首先說下我用的是thinkphp3.2.3版,剛開始按照老師的流程寫下來是問題,后百度解決了
第一步:
1.httpd.conf中去掉LoadModule rewrite_module modules/mod_rewrite.so 前面的#號(hào)
2.AllowOverride None 修改為了AllowOverride All(如果有兩處,就都修改了吧)
(記得重啟wrap服務(wù))
二:這里不是Apache的配置文件了
(通過index.php生成的列如APP文件下的conf)
3.在config文件中添加以下配置:?
// URL地址不區(qū)分大小寫
'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沒有問題,按照老師的寫下來有問題)