aDriv4 - MANAGER
Edit File: .htaccess
# ========================================= # ENABLE REWRITE ENGINE # ========================================= RewriteEngine On # ========================================= # BLOCK KNOWN ATTACKING IP RANGE # (from your logs: 57.141.14.xxx) # ========================================= <RequireAll> Require all granted Require not ip 57.141.14.0/24 </RequireAll> # ========================================= # BLOCK SPAM / MALICIOUS QUERY STRINGS # ========================================= RewriteCond %{QUERY_STRING} (slot|judi|casino|kpr88|goldwin|kenzototo|mandiri|satria|borneo|messages/new) [NC] RewriteRule .* - [F,L] # ========================================= # BLOCK MALICIOUS / FAKE URL PATHS # ========================================= RewriteCond %{REQUEST_URI} ^/eaton/menu [NC,OR] RewriteCond %{REQUEST_URI} ^/blog/video [NC,OR] RewriteCond %{REQUEST_URI} ^/blog/wp-content/video [NC] RewriteRule .* - [F,L] # ========================================= # BLOCK BAD BOTS (ALLOW GOOD ONES) # ========================================= RewriteCond %{HTTP_USER_AGENT} (bot|crawl|spider|scrapy|curl|wget|python|java|libwww|masscan|nikto|sqlmap|nmap|dirbuster) [NC] RewriteCond %{HTTP_USER_AGENT} !(googlebot|bingbot|yahoo|duckduckbot) [NC] RewriteRule .* - [F,L] # ========================================= # BLOCK EMPTY USER AGENTS # ========================================= RewriteCond %{HTTP_USER_AGENT} ^-?$ [OR] RewriteCond %{HTTP_USER_AGENT} ^$ RewriteRule .* - [F,L] # ========================================= # PREVENT IMAGE HOTLINKING # ========================================= RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^https://(www\.)?vertexpower\.co\.in [NC] RewriteRule \.(jpg|jpeg|png|gif|webp)$ - [F,NC,L] # ========================================= # ENABLE GZIP COMPRESSION # ========================================= <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE text/html text/plain text/css application/javascript application/json application/xml </IfModule> # ========================================= # ENABLE BROWSER CACHING # ========================================= <IfModule mod_expires.c> ExpiresActive On # Images ExpiresByType image/jpg "access 1 month" ExpiresByType image/jpeg "access 1 month" ExpiresByType image/png "access 1 month" ExpiresByType image/webp "access 1 month" ExpiresByType image/gif "access 1 month" # CSS & JS ExpiresByType text/css "access 1 week" ExpiresByType application/javascript "access 1 week" # Fonts ExpiresByType font/woff2 "access 1 month" ExpiresByType font/woff "access 1 month" # Default ExpiresDefault "access 2 days" </IfModule> # ========================================= # DISABLE DIRECTORY LISTING # ========================================= Options -Indexes # ========================================= # BASIC SECURITY HEADERS # ========================================= <IfModule mod_headers.c> Header set X-Content-Type-Options "nosniff" Header set X-Frame-Options "SAMEORIGIN" Header set X-XSS-Protection "1; mode=block" </IfModule> # ========================================= # LIMIT REQUEST METHODS # ========================================= <LimitExcept GET POST HEAD> Order Allow,Deny Deny from all </LimitExcept> #RewriteEngine On RewriteRule ^index\.shtml$ http://www.vertexpower.co.in [R=301,L] RewriteRule ^clientle\.shtml$ /clientele.shtml [R=301,L] ErrorDocument 404 /404.html # WebP MIME type <IfModule mod_mime.c> AddType image/webp .webp </IfModule> # Enable Gzip Compression <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript </IfModule> # Enable Browser Caching <IfModule mod_expires.c> ExpiresActive On ExpiresDefault "access plus 1 month" ExpiresByType image/x-icon "access plus 1 year" ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType image/gif "access plus 1 year" ExpiresByType image/webp "access plus 1 year" ExpiresByType text/css "access plus 1 month" ExpiresByType text/javascript "access plus 1 month" ExpiresByType application/javascript "access plus 1 month" ExpiresByType font/woff2 "access plus 1 year" </IfModule> # php -- BEGIN cPanel-generated handler, do not edit # Set the “ea-php74” package as the default “PHP” programming language. <IfModule mime_module> AddHandler application/x-httpd-ea-php74___lsphp .php .php7 .phtml </IfModule> # php -- END cPanel-generated handler, do not edit