We have setup about two dozen internal web applications. Now years later, I'd like to start using packages from external sources and installing items by using Composer which manages packages. I've never needed it before but would like to try adding some extra functionality to these sites.
The problem is none of these internal websites were setup with /project/public_html/ structures. The document root is the main directory inside WAMP.
So the DOCUMENT_ROOT directories look something like this:
c:\wamp64\www\my-site1\
c:\wamp64\www\my-site2\
c:\wamp64\www\my-site3\
Each project is different and might require different php packages. I'd like to be able to use Composer to manage the packages.
When you run Composer is creates a vendor folder. I know that good practice dictates that we should put it in a structure like this:
C:\wamp64\www\my-project1\vendor //for vendor code
C:\wamp64\www\my-project1\public_html //for DOCUMENT_ROOT
But what I have ended up with is thus:
C:\wamp64\www\my-site1\vendor //for vendor code specific to site1
C:\wamp64\www\my-site2\vendor //for vendor code specific to site2
Can I use apache rewrite rules to hide this vendor folder and all child folders from the public web? Idea being it would deny a user that types in http://my-site1/vendor/somevendor/somefile.php but would still allow my scripts to require or include and use the files in that directory when needed.
Alternatively can I put vendor here:
C:\wamp64\www\vendor
and then somehow only include the vendor projects that I want? Not all vendor packages to every project, some way to specify which classes or packages I want to use on a per site basis.