RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^login|signup|logout$ /api/auth.php
RewriteRule ^user$ /classes/user.php
RewriteRule ^photo$|^photo\/[0-9]+$$ /api/photo.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d