{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreibm46m6zf37cloc5346y2jeztqtku2ybeius4lpviuwopbarvm6mu",
"uri": "at://did:plc:qfsyszxhq5agxsg2n5zo4lno/app.bsky.feed.post/3mkxd3waug6g2"
},
"path": "/t/how-to-map-different-subdomains-to-the-same-directory/118480#post_1",
"publishedAt": "2026-05-03T14:01:05.000Z",
"site": "https://forum.infinityfree.com",
"textContent": "I want to configure multiple subdomains to point to the same directory (document root), but I **do not have access to the server configuration** (Apache/Nginx). I am using a hosting provider with limited access (shared hosting).\n\n### Goal\n\nI have:\n\n * `a.example.com`\n * `b.example.com`\n\n\n\nAnd I want both to serve content from the same folder, for example:\n\n\n public_html/myapp\n\n\n### Current situation\n\n * Both subdomains are already created in the hosting panel\n * By default, each subdomain points to its own folder\n\n\n\n### What I want\n\nInstead of separate folders, I want:\n\n * `a.example.com` → `public_html/myapp`\n * `b.example.com` → `public_html/myapp`\n\n\n\n### Constraints\n\n * I cannot edit Apache/Nginx config (no access to virtual hosts)\n * I only have access to:\n * Control panel (e.g., vPanel)\n * File manager / FTP\n * `.htaccess`\n\n\n\n### Question\n\nWhat is the best way to make multiple subdomains point to the same directory in this situation?\n\n * Is there a way to configure this via the hosting control panel?\n * Can this be achieved using `.htaccess` (rewrite or redirect)?\n * Or is there another workaround (e.g., symlinks, addon domains, etc.)?\n\n",
"title": "How to map different subdomains to the same directory?"
}