I have these following lines in my .htaccess file. I don't know if I put them there a long time ago, but I'm sure that they're completely unnecessary (I'm sure that there's security measures against accessing these files anyway).
I use BlueHost hosting and they have a master .htaccess file that I'd imagine protects me from most major security attacks. Here is my file that sits in my root directory:
Are those first several lines necessary? I'd imagine that the error logs and htaccess aren't accessible anyway, correct?Code:<Files .htaccess> order allow,deny deny from all </Files> <Files error_log> order allow,deny deny from all </Files> <Files error_log.txt> order allow,deny deny from all </Files> RewriteEngine on RewriteBase / RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301] //a few 301 redirects ErrorDocument 400 http://www.domain.com/400.php ErrorDocument 401 http://www.domain.com/401.php ErrorDocument 403 http://www.domain.com/403.php ErrorDocument 404 http://www.domain.com/404.php ErrorDocument 500 http://www.domain.com/500.php


Reply With Quote
Bookmarks