How to Block an IP Using the .htaccess File
If you want to block or whitelist specific IP addresses, you can do it with an IP Manager. If you prefer doing changes via .htaccess or you want to create settings for a list of addresses, all you need to do is: Option 1 — Block or allow specific IP addresses To set rules for […]
Read MoreUse of .htaccess file
Basic Use of .htaccess file Force HTTPS RewriteEngine OnRewriteCond %{HTTPS} !=onRewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] Redirect from old page to new page Redirect 301 /old-page.html https://example.com/new-page.html Custom 404 Page ErrorDocument 404 /custom-404.html Prevent directory listing Options -Indexes Enable gzip compression AddOutputFilterByType DEFLATE text/html text/css application/javascript
Read More