Hi Vercel community,
I have a unique issue with a Flutter web app deployment where subdomain routing behaves differently than the main domain:
Current Behavior:
- Main domain (example.com): Works perfectly
- Subdomain (app.example.com): Automatically redirects to app.example.com/widget
Working Configuration for Main Domain:
{ "version": 2, "name": "myapp", "rewrites": [ { "source": "/(.*)", "destination": "/index.html" } ]}Technical Setup:
- Flutter web application
- GoRouter for client-side routing
- PathUrlStrategy enabled
- Multiple attempted subdomain rewrite rules, none successful
What I've Tried:
- Different rewrite patterns including negative lookaheads
- Host-based conditions in rewrites
- Various combinations of source/destination paths
Project Structure:
├── app/│ └── index.html├── public/├── support/└── vercel.jsonThis seems to be a specific edge case with Flutter web's routing system interacting with Vercel's subdomain handling. Has anyone encountered this or found a solution?
Thanks in advance!