# Enable Rewrite Engine
RewriteEngine On

# Rule for API tracking functionality - route to api.click.php
RewriteRule ^api/(.+)/(.+)$ /api.click.php?click=$1/$2 [L,QSA]

# Remove .php extension - handles requests
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^([^\.]+)$ $1.php [L]
####
