# --- Enforce HTTPS for the webhook ---
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^wakeeza/webhookpaystack\.php$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# --- Restrict access to specific IPs for the webhook ---
<Files "webhookpaystack.php">
    Require ip 52.31.139.75
    Require ip 52.49.173.169
    Require ip 52.214.14.220
    Require all denied
</Files>

# --- Custom 404 page ---
ErrorDocument 404 /404.php