В вашем файле httpd.conf уже должна быть строка, запрещающая доступ к файлам .ht *, которая, вероятно, будет выглядеть следующим образом:
<Files ~ "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</Files>
Если вы хотите использовать избыточность, лучше всего использовать Files или FilesMatch для ее защиты. Если вы хотите использовать Rewrite для этого, вы можете бросить 404, как будто его не существует.
Вот перенаправление (не mod_rewrite) для каталога / inc на страницу 404
Это на http://httpd.apache.org/docs/2.0/mod/mod_alias.html
Redirect 404 /inc
Теперь для переписывания
см. http://httpd.apache.org/docs/current/mod/mod_rewrite.html
#Set the page (and order of if they are there) to be shown if asked for a directory
#just put index.php if that's all you want
DirectoryIndex index.php index.html
RewriteEngine on
# if not www.onbip.com, then send to http://www.onbip.com
RewriteCond %{HTTP_HOST} !^www\.onbip\.com [NC]
RewriteRule ^(.*)$ http://www.onbip.com/$1 [R=301,NC,L]
# Now if entered "/index-ab.html" then call "/?lang=ab"
# You might want to see about the regex for proper lang, I put something like "en" or "us-en"
RewriteBase /
RewriteRule ^index-([a-z]{2}(-[a-z]{2})?)\.html$ ?lang=$1 [R=301,NC,L]
Последний вызовет «/» с сервера, который будет первым «index.php», если он существует в соответствии с индексом каталога.