# Directory Listing
Options All -Indexes

# Error Redirect
ErrorDocument 404 /404

# Header all
<IfModule mod_headers.c>
	# X-Frame-Options header missing
	Header append X-FRAME-OPTIONS "SAMEORIGIN"

	# XSS Protection Not Enabled
	Header set X-XSS-Protection "1; mode=block"

	# Missing X-Content-Type-Options is not specified
	Header set X-Content-Type-Options nosniff

	# Protect from SQL injection
	Options +FollowSymLinks
	RewriteEngine On
	RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
	RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
	RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
	RewriteRule ^(.*)$ index.php [F,L]

	# IMAGE CACHE
	<FilesMatch "\.(ico|pdf|flv|jpg|JPG|jpeg|png|PNG|gif|js|css|swf)$">
	Header set Cache-Control "max-age=31536000, public"
	</FilesMatch>

	# TEXT CACHE
	<FilesMatch "\.(xml|txt)$">
	Header set Cache-Control "max-age=31536000, public"
	</FilesMatch>

	# HTML CACHES
	<FilesMatch "\.(html|htm)$">
		Header set Cache-Control "max-age=31536000, public"
	</FilesMatch>
</IfModule>

# Disable modsecurity
<IfModule mod_security.c>
	SecFilterEngine Off
	SecFilterScanPOST Off

	# Server Information Disclosure
	ServerTokens Prod
	ServerSignature Off
	SecServerSignature " "
</IfModule>

# Block config access
<Files .koneksi.php>
	Order allow,deny
	Deny from all
</Files>

# Block htaccess access
<files .htaccess>
	order allow,deny
	deny from all
</files>

<IfModule mod_rewrite.c>
  	<IfModule mod_negotiation.c>
   		Options -MultiViews -Indexes
  	</IfModule>

	Options +FollowSymlinks
	RewriteEngine on
	RewriteBase /

	RewriteEngine On
	RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
	RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

	RewriteCond %{HTTPS} off
	RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

	# PROVIDER PAGES
	RewriteRule ^slot/([a-zA-Z0-9_-]+)/$ slot.php?provider=$1 [L]
	RewriteRule ^sports/([a-zA-Z0-9_-]+)/$ sports.php?provider=$1 [L]
	RewriteRule ^casino/([a-zA-Z0-9_-]+)/$ casino.php?provider=$1 [L]
	RewriteRule ^fishing/([a-zA-Z0-9_-]+)/$ fishing.php?provider=$1 [L]
	RewriteRule ^egames/([a-zA-Z0-9_-]+)/$ egames.php?provider=$1 [L]
	RewriteRule ^togel/([a-zA-Z0-9_-]+)/$ togel.php?provider=$1 [L]
	RewriteRule ^slot/([a-zA-Z0-9_-]+)/page=([a-zA-Z0-9_-]+)$ slot.php?provider=$1&page=$2 [L]
	RewriteRule ^sports/([a-zA-Z0-9_-]+)/page=([a-zA-Z0-9_-]+)$ sports.php?provider=$1&page=$2 [L]
	RewriteRule ^casino/([a-zA-Z0-9_-]+)/page=([a-zA-Z0-9_-]+)$ casino.php?provider=$1&page=$2 [L]
	RewriteRule ^fishing/([a-zA-Z0-9_-]+)/page=([a-zA-Z0-9_-]+)$ fishing.php?provider=$1&page=$2 [L]
	RewriteRule ^egames/([a-zA-Z0-9_-]+)/page=([a-zA-Z0-9_-]+)$ egames.php?provider=$1&page=$2 [L]
	RewriteRule ^togel/([a-zA-Z0-9_-]+)/page=([a-zA-Z0-9_-]+)$ togel.php?provider=$1&page=$2 [L]

	# SLOT PAGES
	RewriteRule ^slot/rtp-slot$ slot-rtp.php [L]
	RewriteRule ^slot/PRAGMATIC$ PRAGMATIC.php [L]
	RewriteRule ^slot/PGSOFT$ PGSOFT.php [L]
	RewriteRule ^slot/HABANERO$ HABANERO.php [L]
	RewriteRule ^slot/BOOONGO$ BOOONGO.php [L]
	RewriteRule ^slot/CQ9$ CQ9.php [L]
	RewriteRule ^slot/PLAYSON$ PLAYSON.php [L]
	RewriteRule ^slot/EVOPLAY$ EVOPLAY.php [L]
	RewriteRule ^slot/TOPTREND$ TOPTREND.php [L]
	RewriteRule ^slot/DREAMTECH$ DREAMTECH.php [L]
	RewriteRule ^slot/REELKINGDOM$ REELKINGDOM.php [L]
	RewriteRule ^casino/EVOLUTION$ EVOLUTION.php [L]
	RewriteRule ^casino/EZUGI$ EZUGI.php [L]

	# MEMBER PAGES
	RewriteRule ^bank$ members/bank.php [L]
	RewriteRule ^dashboard$ members/dashboard.php [L]
	RewriteRule ^deposit$ members/deposit.php [L]
	RewriteRule ^history-betting$ members/history-betting.php [L]
	RewriteRule ^history-bonus$ members/history-bonus.php [L]
	RewriteRule ^history-slot$ members/history-slot.php [L]
	RewriteRule ^history-togel$ members/history-togel.php [L]
	RewriteRule ^history$ members/history.php [L]
	RewriteRule ^password$ members/password.php [L]
	RewriteRule ^payment$ members/payment.php [L]
	RewriteRule ^payment-withdraw$ members/payment-withdraw.php [L]
	RewriteRule ^profil$ members/profil.php [L]
	RewriteRule ^referrals$ members/referrals.php [L]
	RewriteRule ^taruhan$ members/taruhan.php [L]
	RewriteRule ^withdraw$ members/withdraw.php [L]

	# STATIC PAGES
	RewriteRule ^page/([a-zA-Z0-9_-]+)$ page/page.php?p=$1 [L]
	RewriteRule ^contact page/contact.php [L]
	RewriteRule ^referral page/referral.php [L]
	RewriteRule ^promo page/promo.php [L]
	RewriteRule ^search page/search.php [L]
	RewriteRule ^404 page/404.php [L]
	RewriteRule ^maintenance-games page/maintenance-games.php [L]
	RewriteRule ^maintenance-web page/maintenance-web.php [L]

	# AUTH PAGES
	RewriteRule ^login auth/login.php [L]
	RewriteRule ^register auth/register.php [L]
	RewriteRule ^logout auth/logout.php [L]
	RewriteRule ^forgot auth/forgot.php [L]

	# Sitemap, RSS, Manifest, Robots.txt
	RewriteRule ^sitemap.xml seo/main/sitemap.php [L]
	RewriteRule ^rss.xml seo/main/rss.php [L]
	RewriteRule ^manifest.json seo/main/manifest.php [L]
	RewriteRule ^robots.txt seo/main/robots.php [L]

	# ALL PAGES
	RewriteRule ^([a-zA-Z0-9_-]+)$ $1.php [L]
	RewriteRule ^([a-zA-Z0-9_-]+)/$ $1.php [L]
</ifModule>



<IfModule pagespeed_module>
 	ModPagespeed On
</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

# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
<IfModule php7_module>
   php_flag display_errors Off
   php_value max_execution_time 30
   php_value max_input_time 60
   php_value max_input_vars 1000
   php_value memory_limit 128M
   php_value post_max_size 8M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path "/var/cpanel/php/sessions/ea-php74"
   php_value upload_max_filesize 2M
   php_flag zlib.output_compression On
</IfModule>
<IfModule lsapi_module>
   php_flag display_errors Off
   php_value max_execution_time 30
   php_value max_input_time 60
   php_value max_input_vars 1000
   php_value memory_limit 128M
   php_value post_max_size 8M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path "/var/cpanel/php/sessions/ea-php74"
   php_value upload_max_filesize 2M
   php_flag zlib.output_compression On
</IfModule>
# END cPanel-generated php ini directives, do not edit
