 RewriteEngine on
RewriteRule ^/ /index.php [L]
RewriteRule ^post/([^/]+)/? index.php?page=post&id=$1 [L]
RewriteRule ^category/([^/]+)/? index.php?page=category&id=$1 [L]
# Chuyển yêu cầu không phải là tập tin hoặc thư mục đến file có .php theo đường dẫn gốc
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L,QSA]


# Chuyển hướng tất cả các yêu cầu không hợp lệ đến trang /404
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /404 [L]
Options -Indexes


RewriteRule ^api/atm /api/charging/atm_pay.php [L]

RewriteRule ^atm /api/charging/atm_pay.php [L]
RewriteRule ^api/getAtmPay /api/charging/atm_cron.php [L]

