403 禁止隐藏索引的消息.php



我将此内容添加到根目录的.htaccess中。 但是我收到了403禁止的消息!

AddType application/x-httpd-php53 php53 php
php_flag  log_errors on
php_flag  display_errors on
#php_value error_reporting 8
php_value error_reporting E_ALL
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^shidsa.com/$ [NC]
RewriteRule ^(.*)$ http://www.shidsa.com/$1 [R=301,L]
RewriteCond $1 !^(index.php|resources|robots.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA] 
</IfModule>
order allow,deny
allow from all

这应该可以正常工作:

http://shidsa.com/test.php

没有直接负责导致 403 响应的指令。

"禁止"响应的可能原因可能是

  • 返回状态代码 403 的脚本

    检查脚本返回代码

  • PHP 版本 5.3 由于某种原因(例如安全性)不可用或被禁止

    将 PHP 版本更改为当前版本,例如 5.6 或 7.0,或完全删除 AddType 指令

最新更新