Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6476671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:51:12+00:00 2026-05-25T06:51:12+00:00

I was wondering if there was a way to basically host a site on

  • 0

I was wondering if there was a way to basically host a site on your server so you can run PHP, but have the actual code hosted on GitHub. In other words…

If a HTTP request went to:
http://mysite.com/docs.html

It’d request and pull in the content (via file_get_contents() or something):
https://raw.github.com/OscarGodson/Core.js/master/docs.html

Or, if they went to:
http://mysite.com/somedir/another/core.js

It’d pull down:
https://raw.github.com/OscarGodson/Core.js/master/somedir/another/core.js

I know GitHub has their own DNS servers, but id rather host it on my so i can run server side code. What would the htaccess code look like for this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:51:13+00:00Added an answer on May 25, 2026 at 6:51 am

    This is beyond the capabilities of .htaccess files, if the requirement is to run the PHP embedded in the HTML stored on github.com at the server on yourserver.com simply by a configuration line like a redirect in the .htaccess file.

    A .htaccess file is typically used to provide directives to the Apache web server. These directives can indicate, for example, access permissions, popup password protection, linkages between URLs and the server’s file system, handlers for certain types of files when fetched by the server before delivery to the browser, and redirects from one URL to another URL.

    An .htaccess file can issue redirects for http://mysite.com/somedir/another/core.js to https://raw.github.com…. but then the browser will be pointed to raw.github.com, not mysite.com. Tricks can be done with frames to make this redirection less transparent to the human at the browser… but these dont affect the fact that the data comes from github.com without ever going to the server at mysite.com

    In particular, PHP tags embedded in the HTML on github.com are never received by mysite.com’s server and therefore will not run. Probably not want you want. Unless some big changes have occurred in Apache, .htaccess files will not set up that workflow. It might be possible for some expert to write an apache module to do it, but I am not sure.

    What you can do is put a cron job on mysite.com that git pull’s from github.com every few minutes. Perhaps that is what you want to do instead?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just wondering is there any way I can check whether the url links to
I was wondering is there a way in PHP that you could tell where
I am wondering is there any way we can test the font size/color of
just wondering if there is a way to reduce the amount of code needed
just wondering is there any way that I can return one value from my
I'm wondering if there is a way to start a separate thread in php
I'm wondering if there is a way to call variable functions with namespaces. Basically
Basically wondering if there's a way for me to create a VB application in
basically, I was wondering if there is any way of specifying the colours of
This might be an odd question. I'm basically wondering if there's a way to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.