.htaccess to ban access to HTTP? 2025-04-01 Is it possible for me to use an .htaccess file to ban access by IP to a website or directory? And if so can you please give me a sample line of code. I would prefer not to use MOD_REWRITE. Thank-you.