I am using Cloudflare for DNS and InfinityFree for hosting. I want “https://admin.firazserver.qzz.io” to display the content from “https://www.firazserver.qzz.io/Admin” while keeping the browser address as “https://admin.firazserver.qzz.io” without any redirect. Is it possible to achieve this using Cloudflare DNS, Cloudflare features, or any setting in InfinityFree? If so, what is the recommended method?
It’s not possible to customize the website folder on InfinityFree, so I’m afraid that it’s not going to work.
The right way to do this would be to change the linked folder of the admin subdomain to the Admin folder on your other site. But that’s not possible on InfinityFree.
I think it’s possible to do something like this using Cloudflare URL rewrites and host header spoofing, but that’s an extremely hacky solution which may have surprising bugs. Which seems like a lot of risk for a cosmetic issue.
Can you please explain me in more detailed?
Basically, it’s not possible on free hosting. Any hacky Cloudflare solution is not worth it for a small cosmetic change like this. Moving the files to the other domain is the better solution.
I understand that shifting the Admin folder would be the best and recommended approach. However, I am curious about what was mentioned regarding Cloudflare URL rewrites and host header spoofing. I would like to know more about how this works in detail and why it is considered a hacky solution, even if it is not recommended for production use.
No, I can’t explain it to you in detail. Note that I said that “I think it’s possible”, which means I don’t know, which is because I never tried it.
If you’re willing to put in a lot of effort to get a hacky solution, then please do go ahead and try. Just don’t ask me to do the leg work for you. I’ve given you enough pointers to get started. And if that’s too much work for you, then I recommend to just accept that this is not supported on free hosting.