From d8bf5fac6d3783d239407f449f7fa5d62f35f29c Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Wed, 30 Mar 2011 22:19:18 -0600 Subject: [PATCH] .htaccess: re-direct php.ini to 404 error page --- .htaccess | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.htaccess b/.htaccess index 136716f..bef70b0 100644 --- a/.htaccess +++ b/.htaccess @@ -1,4 +1,4 @@ -# Use PHP5 Single php.ini as default +#Use PHP5 Single php.ini as default AddHandler application/x-httpd-php5s .php #Custom error pages @@ -11,4 +11,8 @@ ErrorDocument 500 /errors/500.php #Deny access to git files (actually, return 404 errors) RedirectMatch 404 /\\.git(/|$) RedirectMatch 404 /\\.gitignore$ +#Deny access to php.ini from web +RedirectMatch 404 ^/php.ini$ +#Re-direct from old blog location to the new RedirectMatch 301 ^/home/(.*) /blog/$1 +RedirectMatch 301 ^/home /blog/