1. 问答
  2. 问答详情

apache怎么配置禁止访问index.php以外的php文件

apache服务器配置禁止访问index.php以外的php文件

1个回答

0

采纳

在网站根目录下新建一个文件:.htaccess
RewriteEngine on
RewriteRule ^(.*)$ /index.php/$1 [L]

把所有的请求都转到index.php

撰写答案

验证码
点击刷新