### Rewrite Rules Added by CyberPanel Rewrite Rule Generator

RewriteEngine On
RewriteCond %{HTTPS}  !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

### End CyberPanel Generated Rules.

Options All -Indexes

<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]

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

	RewriteEngine On
	RewriteRule ^extension config/extension.php [L]
	RewriteRule ^login auth/login.php [L]
	RewriteRule ^register auth/register.php [L]
	RewriteRule ^logout auth/logout.php [L]
	RewriteRule ^forgot auth/forgot.php [L]
	RewriteRule ^bank$ members/bank.php [L]
	RewriteRule ^dashboard$ members/dashboard.php [L]
	RewriteRule ^deposit$ members/deposit.php [L]
	RewriteRule ^deposit_qris members/depo_qris.php [L]
	RewriteRule ^voucher$ members/voucher.php [L]
	RewriteRule ^history-togel$ members/history-togel.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$ 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 ^verifikasi$ members/verifikasi.php [L]
	RewriteRule ^taruhan$ members/taruhan.php [L]
	RewriteRule ^withdraw$ members/withdraw.php [L]
	RewriteRule ^jadwal$ members/jadwal.php [L]
	RewriteRule ^liveresult$ members/liveresult.php [L]
	RewriteRule ^panduan$ members/panduan-togel.php [L]
	RewriteRule ^rtp-slot$ rtp-slot.php [L]
	RewriteRule ^slot-terbaru$ slot-terbaru.php [L]
	RewriteRule ^slot$ slot.php [L]
	RewriteRule ^sports$ sports.php [L]
	RewriteRule ^casino$ casino.php [L]
	RewriteRule ^fishing$ fishing.php [L]
	RewriteRule ^egames$ egames.php [L]
	RewriteRule ^togel$ togel.php [L]
	RewriteRule ^page/([a-zA-Z0-9_-]+)$ page/page.php?p=$1 [L]
	RewriteRule ^welcome$ page/welcome.php [L]
	RewriteRule ^contact$ page/contact.php [L]
	RewriteRule ^referral$ page/referral.php [L]
	RewriteRule ^promo$ page/promo.php [L]
	RewriteRule ^404$ page/404.php [L]
	RewriteRule ^maintenance-games$ page/maintenance-games.php [L]
	RewriteRule ^maintenance-web$ page/maintenance-web.php [L]
	RewriteRule ^search$ page/search.php [L]
	RewriteRule ^slot/([a-zA-Z0-9_-]+)$ slot.php?provider=$1 [L]
	RewriteRule ^rtp-slot/([a-zA-Z0-9_-]+)$ slot-rtp.php?provider=$1 [L]
	RewriteRule ^slot-terbaru/([a-zA-Z0-9_-]+)$ slot-terbaru.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 ^prediksi$ page/prediksi.php [L]
	RewriteRule ^buku-mimpi$ page/buku-mimpi.php [L]
	RewriteRule ^buku-mimpi-all$ page/buku-mimpi-all.php [L]
	RewriteRule ^livedraw$ togel.php [L]
	RewriteRule ^livedraw-all$ page/livedraw-all.php [L]
	RewriteRule ^statistik$ togel.php [L]
	RewriteRule ^statistik-all$ page/statistik-all.php [L]
	RewriteRule ^prediksi/([a-zA-Z0-9_-]+)$ page/prediksi.php [L]
	RewriteRule ^buku-mimpi/([a-zA-Z0-9_-]+)$ page/buku-mimpi.php?page=$1 [L]
	RewriteRule ^buku-mimpi-all/([a-zA-Z0-9_-]+)$ page/buku-mimpi-all.php?page=$1 [L]
	RewriteRule ^livedraw/([a-zA-Z0-9_-]+)$ page/livedraw.php?market=$1 [L]
	RewriteRule ^livedraw-all/([a-zA-Z0-9_-]+)$ page/livedraw-all.php?page=$1 [L]
	RewriteRule ^statistik-all/([a-zA-Z0-9_-]+)$ page/statistik-all.php?page=$1 [L]
	RewriteRule ^statistik/([a-zA-Z0-9_-]+)$ page/statistik.php?market=$1 [L]
	RewriteRule ^gameplay/launch/([a-zA-Z0-9_-]+)$ gameplay/launch.php?gamecode=$1 [L]
	RewriteRule ^gameplay/demo/([a-zA-Z0-9_-]+)$ gameplay/demo.php?gamecode=$1 [L]
	RewriteRule ^taruhan/pid-([^-]*)$ members/taruhan.php?pid=$1 [L]
	RewriteRule ^taruhan/pid-([^-]*)-gameid-([^-]*)$ members/taruhan.php?pid=$1&gameid=$2 [L]
	RewriteRule ^sitemap.xml$ seo/main/sitemap.php [L]
	RewriteRule ^sitemap_master.xml$ seo/main/sitemap_master.php [L]
	RewriteRule ^sitemap_pages.xml$ seo/main/sitemap_pages.php [L]
	RewriteRule ^sitemap_games.xml$ seo/main/sitemap_games.php [L]
	RewriteRule ^sitemap_images.xml$ seo/main/sitemap_images.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]
	RewriteRule ^([a-zA-Z0-9_-]+)$ $1.php [L]
	RewriteRule ^([a-zA-Z0-9_-]+)/$ $1.php [L]

	RewriteEngine On
	ErrorDocument 403 /404
	ErrorDocument 404 /404
</ifModule>

<FilesMatch "function\.php|koneksi\.php|minifier\.php|other\.php|script\.php|tanggal\.php|session\.php|scripts\.php|markets\.php">
	Order allow,deny
	Deny from all
</FilesMatch>

<Files error_log>
	Order allow,deny
	Deny from all
</Files>

<Files .htaccess>
	Order allow,deny
	Deny from all
</Files>

<IfModule mod_headers.c>
	Header append X-FRAME-OPTIONS "SAMEORIGIN"
	Header set X-XSS-Protection "1; mode=block"
	Header set X-Content-Type-Options nosniff
	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]
	<FilesMatch "\.(ico|pdf|flv|jpg|JPG|jpeg|png|PNG|gif|js|css|swf)$">
	Header set Cache-Control "max-age=31536000, public"
	</FilesMatch>
	<FilesMatch "\.(xml|txt)$">
	Header set Cache-Control "max-age=31536000, public"
	</FilesMatch>
	<FilesMatch "\.(html|htm)$">
		Header set Cache-Control "max-age=31536000, public"
	</FilesMatch>
</IfModule>

<IfModule mod_expires.c>
	ExpiresActive On
	ExpiresByType image/jpeg "access plus 1 year"
	ExpiresByType image/jpg "access plus 1 year"
	ExpiresByType image/JPG "access plus 1 year"
	ExpiresByType image/gif "access plus 1 year"
	ExpiresByType image/png "access plus 1 year"
	ExpiresByType image/PNG "access plus 1 year"
	ExpiresByType image/bmp "access plus 1 year"
	ExpiresByType image/webp "access plus 1 year"
	ExpiresByType image/svg+xml "access plus 1 year"
	ExpiresByType image/x-icon "access plus 1 year"
	ExpiresByType image/ico "access plus 1 year"
	ExpiresByType image/vnd.microsoft.icon "access plus 1 year"
	ExpiresByType video/webm "access plus 1 year"
	ExpiresByType video/mp4 "access plus 1 year"
	ExpiresByType video/mpeg "access plus 1 year"
	ExpiresByType video/ogg "access plus 1 year"
	ExpiresByType font/ttf "access plus 1 year"
	ExpiresByType font/otf "access plus 1 year"
	ExpiresByType font/woff "access plus 1 year"
	ExpiresByType font/woff2 "access plus 1 year"
	ExpiresByType application/font-woff "access plus 1 year"
	ExpiresByType text/html "access plus 1 year"
	ExpiresByType text/css "access plus 1 year"
	ExpiresByType text/javascript "access plus 1 year"
	ExpiresByType text/x-javascript "access plus 1 year"
	ExpiresByType text/plain "access plus 1 year"
	ExpiresByType text/x-component "access plus 1 year"
	ExpiresByType text/cache-manifest "access plus 1 month"
	ExpiresByType application/atom+xml "access plus 1 hour"
	ExpiresByType application/rdf+xml "access plus 1 hour"
	ExpiresByType application/rss+xml "access plus 1 hour"
	ExpiresByType application/json "access plus 1 month"
	ExpiresByType application/ld+json "access plus 1 month"
	ExpiresByType application/schema+json "access plus 1 month"
	ExpiresByType application/vnd.geo+json "access plus 1 month"
	ExpiresByType application/xml "access plus 1 month"
	ExpiresByType application/javascript "access plus 1 years"
	ExpiresByType application/x-javascript "access plus 1 years"
	ExpiresByType application/manifest+json "access plus 1 month"
	ExpiresByType application/x-web-app-manifest+json "access plus 1 month"
	ExpiresByType application/pdf "access plus 1 year"
	ExpiresByType application/x-shockwave-flash "access plus 1 year"
	ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
	ExpiresByType application/x-font-ttf "access plus 1 year" 
	ExpiresByType application/font-woff "access plus 1 year" 
	ExpiresByType application/font-woff2 "access plus 1 year"
	ExpiresByType application/x-font-woff "access plus 1 year"
</IfModule>

<IfModule mod_deflate.c>
	AddOutputFilterByType DEFLATE text/plain
	AddOutputFilterByType DEFLATE text/javascript
	AddOutputFilterByType DEFLATE text/html
	AddOutputFilterByType DEFLATE text/xml
	AddOutputFilterByType DEFLATE text/css
	AddOutputFilterByType DEFLATE text/vtt 
	AddOutputFilterByType DEFLATE text/x-component
	AddOutputFilterByType DEFLATE application/xml
	AddOutputFilterByType DEFLATE application/xhtml+xml
	AddOutputFilterByType DEFLATE application/rss+xml
	AddOutputFilterByType DEFLATE application/js
	AddOutputFilterByType DEFLATE application/javascript
	AddOutputFilterByType DEFLATE application/x-javascript
	AddOutputFilterByType DEFLATE application/x-httpd-php
	AddOutputFilterByType DEFLATE application/x-httpd-fastphp
	AddOutputFilterByType DEFLATE application/atom+xml 
	AddOutputFilterByType DEFLATE application/json
	AddOutputFilterByType DEFLATE application/ld+json 
	AddOutputFilterByType DEFLATE application/vnd.ms-fontobject 
	AddOutputFilterByType DEFLATE application/x-font-ttf 
	AddOutputFilterByType DEFLATE application/font-sfnt
	AddOutputFilterByType DEFLATE application/x-web-app-manifest+json 
	AddOutputFilterByType DEFLATE font/opentype 
	AddOutputFilterByType DEFLATE font/otf
	AddOutputFilterByType DEFLATE font/ttf
	AddOutputFilterByType DEFLATE font/sfnt
	AddOutputFilterByType DEFLATE image/svg+xml
	AddOutputFilterByType DEFLATE image/x-icon
	<filesMatch "\.(css|js|ttf|xml|gz|html|php)$">
		Header append Vary: Accept-Encoding
		SetOutputFilter DEFLATE
	</filesMatch>
	SetEnvIfNoCase REQUEST_URI \.(?:ico|jpg|JPG|jpeg|png|PNG|gif)$ no-gzip dont-vary
	BrowserMatch ^Mozilla/4 gzip-only-text/html
	BrowserMatch ^Mozilla/4\.0[678] no-gzip
	BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
	Header append Vary User-Agent
</IfModule>

<ifModule mod_gzip.c>
	mod_gzip_on Yes
	mod_gzip_dechunk Yes
	mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
	mod_gzip_item_include mime ^application/x-javascript.*
	mod_gzip_item_include mime ^text/.*
	mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
	mod_gzip_item_exclude mime ^image/.*
	mod_gzip_item_include handler ^cgi-script$
</ifModule>