-1

I have two eCommerce sites currently on two different shared hosting platforms. The sites sell music digital downloads. They both sell the same music. I would like to move them to a VPS, and I would like to make both sites share the same music files directory, maybe via a symbolic link. The sites use a shopping cart script that I don't have much control over. After a customer pays for a digital download, they are provided with download links. These links request a php script that reads the files and issues download headers that cause the browser to download the specified file, so whatever the solution is, I imagine the php script would have to see the files as though they are part of the same directory tree as the rest of the website. How would I go about setting up such a solution?

1 Answers1

1

If your question is, how do I use symlinks, then if all the files for site 1 are in

/some/dir/site1

and site 2 expects to read files from,

/another/site2/dir

then you simply create a symlink for /another/site2/dir that points to /some/dir/site1 using

ln -s /some/dir/site1 /another/site2/dir 

However, there's an awful lot about your environment that could have an effect, within the code and the permissions, that we don't know enough about.

EightBitTony
  • 9,211
  • 1
  • 32
  • 46