I'm developing a personal website using cloudflare and github pages. Everything works as intended but i'm trying to have a subdomain that points/redirects to a specific page within my github repository.
ex:
DNS management on cloudflare:
Type Name Content CNAME - website.com - githubUserName.github.io
(essentially this means when I type website.com into search bar, it points to the content that is under my repository)
Github Repository:
githubUserName/githubUserName.github.io (the repository)
(go to pages)
custom domain - website.com
(essentially this allows the content to be seen under website.com)
Now everything works as intended. But I'm curious as to how I can have a subdomain such as sub.website.com point to not the full repository as above, but a specific page within my repository. I feel as if this cant be too difficult to do, unless it is not possible given the restraints and limitations of deploying a website through this cloudflare + github pages method.
*note that the name of the repository for github pages to work must be githubUsername.github.io
I've tried adding another CNAME record of the subdomain (sub.website.com) in cloudflare, and point it to the same location/content of my repository (githubUserName.github.io), along with changing in github pages the custom domain to sub.website.com All of this works, but the issue is that the original domain of website.com then stops working.