# check if there is a file named maintenance.php
# so when you want to disable maintenance mode just rename "mv maintenance.php maintenance.php.disabled"
RewriteCond %{DOCUMENT_ROOT}/maintenance.php -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.php
RewriteRule ^.*$ /maintenance.php [R=503,L]
ErrorDocument 503 /maintenance.php
# This file was updated by Duplicator Pro on 2019-06-15 13:06:18.
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
<IfModule litespeed>
RewriteEngine On
RewriteRule .* - [E=noabort:1]
</IfModule>

<IfModule deflate_module>
	<IfModule filter_module>
		AddOutputFilterByType DEFLATE text/plain text/html
		AddOutputFilterByType DEFLATE text/xml application/xml application/xhtml+xml application/xml-dtd
		AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml image/svg+xml
		AddOutputFilterByType DEFLATE text/css text/javascript application/javascript application/x-javascript
		AddOutputFilterByType DEFLATE font/otf font/opentype application/font-otf application/x-font-otf
		AddOutputFilterByType DEFLATE font/ttf font/truetype application/font-ttf application/x-font-ttf
	</IfModule>
</IfModule>

# Harden Headers
<IfModule mod_headers.c>
  Header set X-Content-Type-Options nosniff
  Header set X-XSS-Protection "1; mode=block"
  Header always append X-Frame-Options SAMEORIGIN
</IfModule>
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

# Wordfence WAF
<Files ".user.ini">
<IfModule mod_authz_core.c>
	Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
	Order deny,allow
	Deny from all
</IfModule>
</Files>

# END Wordfence WAF

# BEGIN MainWP

# END MainWP