RewriteEngine On
#Options +FollowSymlinks
#RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]

RewriteRule ^/$ index.php
RewriteRule ^$ index.php
RewriteRule ^404/$ 404.php
ErrorDocument 404 /404.php
AddDefaultCharset UTF-8
Header unset ETag
FileETag None


RewriteRule ^js/default.js$ js/default.php [L]
RewriteRule ^css/style.css$ css/style.php [L]
RewriteRule ^css/css_login.css$ css/css_login.php [L]

RewriteRule ^style.fonts/fonts.css$ style.fonts/fonts.php [L]


# HOME
#RewriteRule ^/$ index.php
RewriteRule ^$ index.php

RewriteRule ^login$ login.php [L]
RewriteRule ^logout$ logout.php [L]

##begin member dashboard
RewriteRule ^a/none$ none.php [L]

RewriteRule ^a/index$ ajax_index.php?a=index&useajax=0 [L]
RewriteRule ^a/index/ajax$ ajax_index.php?a=index&useajax=1 [L]

RewriteRule ^a/index/edit/info$ ajax_index.php?a=index&b=edit&c=info&useajax=0 [L]
RewriteRule ^a/index/edit/info/ajax$ ajax_index.php?a=index&b=edit&c=info&useajax=1 [L]
RewriteRule ^a/index/edit/info/action$ ajax_index.php?a=index&b=edit&c=info&action=1 [L]

RewriteRule ^a/index/edit/bank$ ajax_index.php?a=index&b=edit&c=bank&useajax=0 [L]
RewriteRule ^a/index/edit/bank/ajax$ ajax_index.php?a=index&b=edit&c=bank&useajax=1 [L]
RewriteRule ^a/index/edit/bank/action$ ajax_index.php?a=index&b=edit&c=bank&action=1 [L]

RewriteRule ^a/index/edit/account$ ajax_index.php?a=index&b=edit&c=account&useajax=0 [L]
RewriteRule ^a/index/edit/account/ajax$ ajax_index.php?a=index&b=edit&c=account&useajax=1 [L]
RewriteRule ^a/index/edit/account/action$ ajax_index.php?a=index&b=edit&c=account&action=1 [L]


RewriteRule ^a/profile$ ajax_index.php?a=profile [L]
RewriteRule ^a/profile/ajax$ ajax_index.php?a=profile&useajax=1 [L]

RewriteRule ^a/profile/edit/info$ ajax_index.php?a=profile&b=edit&c=info&useajax=0 [L]
RewriteRule ^a/profile/edit/info/ajax$ ajax_index.php?a=profile&b=edit&c=info&useajax=1 [L]
RewriteRule ^a/profile/edit/info/action$ ajax_index.php?a=profile&b=edit&c=info&action=1 [L]

RewriteRule ^a/profile/edit/bank$ ajax_index.php?a=profile&b=edit&c=bank&useajax=0 [L]
RewriteRule ^a/profile/edit/bank/ajax$ ajax_index.php?a=profile&b=edit&c=bank&useajax=1 [L]
RewriteRule ^a/profile/edit/bank/action$ ajax_index.php?a=profile&b=edit&c=bank&action=1 [L]


RewriteRule ^a/account$ ajax_index.php?a=account [L]
RewriteRule ^a/account/ajax$ ajax_index.php?a=account&useajax=1 [L]

RewriteRule ^a/account/edit/account$ ajax_index.php?a=account&b=edit&c=account&useajax=0 [L]
RewriteRule ^a/account/edit/account/ajax$ ajax_index.php?a=account&b=edit&c=account&useajax=1 [L]
RewriteRule ^a/account/edit/account/action$ ajax_index.php?a=account&b=edit&c=account&action=1 [L]

RewriteRule ^a/deposit$ ajax_index.php?a=deposit [L]
RewriteRule ^a/deposit/ajax$ ajax_index.php?a=deposit&useajax=1 [L]

RewriteRule ^a/deposit/add$ ajax_index.php?a=deposit&b=add&useajax=0 [L]
RewriteRule ^a/deposit/add/ajax$ ajax_index.php?a=deposit&b=add&useajax=1 [L]
RewriteRule ^a/deposit/add/action$ ajax_index.php?a=deposit&b=add&action=1 [L]


RewriteRule ^a/transfer$ ajax_index.php?a=transfer [L]


RewriteRule ^a/withdrawal$ ajax_index.php?a=withdrawal [L]
RewriteRule ^a/withdrawal/ajax$ ajax_index.php?a=withdrawal&useajax=1 [L]

RewriteRule ^a/withdrawal/add$ ajax_index.php?a=withdrawal&b=add&useajax=0 [L]
RewriteRule ^a/withdrawal/add/ajax$ ajax_index.php?a=withdrawal&b=add&useajax=1 [L]
RewriteRule ^a/withdrawal/add/action$ ajax_index.php?a=withdrawal&b=add&action=1 [L]

RewriteRule ^a/history$ ajax_index.php?a=history [L]
##end member dashboard

RewriteRule ^register$ daftar.php [L]
RewriteRule ^register/thanks/([0-9a-zA-Z\-_.%]+)$ daftar.php?rand=$1 [L]

RewriteRule ^gfx/captcha/([0-9]{10}).gif/captcha_order$ recaptcha/captcha.php

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 week"
ExpiresByType image/jpeg "access 1 week"
ExpiresByType image/gif "access 1 week"
ExpiresByType image/png "access 1 week"
ExpiresByType text/css "access 1 week"
ExpiresByType text/html "access 1 week"
ExpiresByType application/pdf "access 1 week"
ExpiresByType text/x-javascript "access 1 week"
ExpiresByType application/x-shockwave-flash "access 1 week"
ExpiresByType image/x-icon "access 1 week"
ExpiresDefault "access 1 week"
</IfModule>

# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript