• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

php include path

gggino

New Pleskian
I have a website with multiple subdomains. All the pages of the principal domain and of all the subdomains need to access an include folder, where are the core php files of the website.

the include directory is in domain.com/httpd/include/

To avoid having to upload multiple copies of such folder, at the moment the solution I have found is to place all the directories of the subdomains inside the httpd directory of the domain

for example the directory for subdomain1.domain.com is in domain1.com/httpd/subdomain1

and then the subdomain pages include the files by putting include('../include/nameoffile.php');

Is it possible obatin the same result, but without putting the subdomain webfolders inside the httpd folder of the main domain?

i would prefer to keep the standard directory structure, also to avoid that somebody will access the pages by getting maindomain.com/subdomain/nameofpage.php instead of subdomain1.domain.com/nameofpage.php
 
Back
Top