# Deficix — Apache rules for cPanel subfolder deployment
Options -Indexes

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /deficix/

  # Redirect legacy library URL
  RewriteRule ^foods/library/?$ foods/recipes/ [R=301,L]

  # Serve existing files and directories
  RewriteCond %{REQUEST_FILENAME} -f [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^ - [L]

  # Fallback for client-side routes
  RewriteRule ^ index.html [L]
</IfModule>
