Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
281 views
in Technique[技术] by (71.8m points)

google cloud platform - Point only homepage to GitHub pages and use GCP web server for everything else

I have an Apache Web Server running on a GCP compute instance. Currently, I have a custom domain pointing to GitHub pages using CNAMEs and A Records. How can I continue with that functionality while also redirecting any subfolders to my web server?

Desired behaviour:

example.com --> xyz.github.io [currently working]
www.example.com --> xyz.github.io [currently working]

example.com/folder/item --> File on GCP webserver
www.example.com/folder/item --> File on GCP webserver

I think it might be possible with .htaccess redirects but I believe that would cause is a certificate and domain mismatch?

Also, one other roadblock is that the folder redirect should be for every folder except /images/ as that's hosted on GitHub already.

question from:https://stackoverflow.com/questions/65852335/point-only-homepage-to-github-pages-and-use-gcp-web-server-for-everything-else

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...