# LMS platform — do not use SetEnv here (causes 500 on many cPanel / LiteSpeed hosts).
# Use config/app.local.php for production base URL and email defaults instead.

<IfModule mod_rewrite.c>
RewriteEngine On

# Short portal URLs (works with or without trailing slash; tolerates extra slashes)
RewriteRule ^/+admin/?$ admin/index.php [L,NC]
RewriteRule ^/+instructor/?$ instructor/index.php [L,NC]

# Custom 404 for missing files/directories (internal rewrite — runs PHP, keeps the requested URL)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . 404.php [L]
</IfModule>
