Skip to main content
2 of 2
Use example domain, code format example URL
Stephen Ostermiller
  • 99.4k
  • 18
  • 141
  • 364

Accessing common files across different domains

I have multiple sites that share a lot of the same files. Sorta like:

  • CoffeeBeansForSale.example
  • CellPhonesForSale.example
  • ComputersForSale.example

They will end up using a lot of the same code / files so it would make sense for both to point to the same info on the server so if I, for example add a new font or update an order form, it wouldn't require updating it on 50 sites. What would be the best way to set this up on the site?

I know in PHP I can create a 'common_site_files' directory and just do an include('/home/mysites/common_site_files/fonts.php'); in PHP. But with HTML it won't really work.

So what would be the best way to set up the sites / directories so I can save myself hours of work in the future?

Robbie
  • 171
  • 2