# Set default index file DirectoryIndex index-eco.php # Redirect msme-registration.php or .html to clean URL RewriteEngine On RewriteRule ^(.*)index-eco\.(php|html?)$ /$1 [R=301,NC,L] # Force non-www RewriteCond %{HTTP_HOST} ^www\.ecogenix\.in$ [NC] RewriteRule ^(.*)$ https://ecogenix.in/$1 [L,R=301] # orce HTTPS RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ /$1 [L,R=301] Header set Cache-Control "no-cache, no-store, must-revalidate" Header set Pragma "no-cache" Header set Expires 0 # lock dangerous file types Order allow,deny Deny from all Options -Indexes # lock suspicious IP (attacker) Require all granted Require not ip 173.208.155.83 # rotect sensitive Apache config files Require all denied