Apache禁止访问index.php以外的PHP文件
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?(.*)$ index.php?s=$1 [QSA,PT,L]
RewriteRule ^((?!index|admini).)*.(php)$ – [F]
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?(.*)$ index.php?s=$1 [QSA,PT,L]
RewriteRule ^((?!index|admini).)*.(php)$ – [F]
</IfModule>