<IfModule mod_rewrite.c>

  Options All -Indexes
  RewriteEngine on

  # Yang Diganti "http://localhost/_dev/base/cstore/" ubah sesuai folder / domain kamu
  ErrorDocument 400 https://balipujas.com/demo/toko/module/err/err_400
  ErrorDocument 403 https://balipujas.com/demo/toko/module/err/err_403
  ErrorDocument 404 https://balipujas.com/demo/toko/module/err/err_404
  ErrorDocument 500 https://balipujas.com/demo/toko/module/err/err_500

  # Web
  RewriteRule ^s/(.*+)/?$ search.php?p_url=$1
  RewriteRule ^p/([^/\.]+)/?$ product_detail.php?p_url=$1
  RewriteRule ^v/([^/\.]+)/?$ product_checkout.php?p_url=$1
  RewriteRule ^c/([^/\.]+)/?$ categories_detail.php?p_url=$1
  RewriteRule ^c0/([^/\.]+)/?$ categories_detail_c0.php?p_url=$1
  RewriteRule ^c1/([^/\.]+)/([^/\.]+)/?$ categories_detail_c1.php?p_url=$1&s_url=$2
  RewriteRule ^c2/([^/\.]+)/([^/\.]+)/([^/\.]+)/?$ categories_detail_c2.php?p_url=$1&s_url=$2&t_url=$3
  RewriteRule ^payment/([^/\.]+)/?$ payment_callback.php?p_url=$1
  RewriteRule ^topup/([^/\.]+)/?$ balance_topup.php?p_url=$1
  RewriteRule ^trx/([^/\.]+)/?$ transaction_detail.php?p_url=$1
  RewriteRule ^n/([^/\.]+)/?$ notification_detail.php?p_url=$1
  RewriteRule ^resetpass/([^/\.]+)/?$ reset-password.php?p_url=$1

  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME}.php -f
  RewriteRule ^(.*)$ $1.php

</IfModule>

<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On 
# Default directive
ExpiresDefault "access plus 1 month"
# My favicon
ExpiresByType image/x-icon "access plus 1 year"
# Images
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
# CSS
ExpiresByType text/css "access plus 1 month"
# Javascript
ExpiresByType application/javascript "access plus 1 year"
</IfModule>