How to host sub domain in sub directory?

Namaste🙏, I want to host my dashboard in example.com/dashboard. I have built dashboard in Svelte and I want to use some other website builder for main page (example.com). So, how can I do it in Cloudflare Pages? I am just beginner to Cloudflare ecosystem😀
17 Replies
Soham
Soham2y ago
Set the name of the dashboard file to dashboard
Vignesh Aithal
Vignesh AithalOP2y ago
How can I redirect it to subdirectory?
Soham
Soham2y ago
So you want example.com/dashboard to go to dashboard.example.com?
DeviAI
DeviAI2y ago
No he want it to redirect to example.com/dashboard.
Soham
Soham2y ago
Then they can use a redirect rule
Vignesh Aithal
Vignesh AithalOP2y ago
I want to use two different technolgies in example.com and example.com/dashboard When users visit example.com/dashboard I want to show users my Svelte app. And when they visit example.com I want to show a Webflow website I tried Redirect but it's not working. I don't know why
Soham
Soham2y ago
Wait so the user types in dashboard. Example.com, and you want it to go to example. Com/dashboard?
Vignesh Aithal
Vignesh AithalOP2y ago
I want to do it like Supabase, where they host their dashboard in subdirectory(supabse.com/dashboard).
justboereh
justboereh2y ago
@iamvignesh it’s probably better to have a dashboard subdomain instead of path so you can use weflow for the home pages and svelte for dashboard pages. afaik i don’t really think it’s possible to combine those two together
Soham
Soham2y ago
Just call the main page of the dashboard "dashboard" and it'll show up as that
Vignesh Aithal
Vignesh AithalOP2y ago
How? I am not getting it
Soham
Soham2y ago
What does it show up as when you load the dashboard?
Vignesh Aithal
Vignesh AithalOP2y ago
Yeah, but I thought a sub directory would be better Currently I have hosted in subdomain called dashboard
Soham
Soham2y ago
Is the page of the dashboard called something like index.html?
Vignesh Aithal
Vignesh AithalOP2y ago
I have built it in Svelte, so its +page.svelte
Soham
Soham2y ago
What if you try use a transform rule
Vignesh Aithal
Vignesh AithalOP2y ago
Ok, I will try and see

Did you find this page helpful?