RewriteEngine On

# Redirect root to php directory
RewriteRule ^$ php/ [L]

# API endpoint rewrite for notices (without .php extension)
RewriteRule ^api/notices$ php/api/notices.php [L]

# Rewrite all requests to php directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ php/$1 [L]