apache .htaccess 配置详解
禁止访问PHP脚本:有一些目录为了提供安全性,不让其运行PHP程序。如:uploads 上传目录,和 include 类库目录
RewriteEngine on
RewriteBase /
RewriteRule (.*).(php)$ – [F]
禁止访问目录:
Deny from all
配置错误页面:
ErrorDocument 404 /404.html
ErrorDocument 500 /404.html