I have a website www.example.com and i have created a subdomain red.example.com
My site has all PHP files in the root folder (public_html).
When the user visits any page of the subdomain, e.g. red.example.com/product1.html, i want that the PHP script from the domains's root to handle the page. In other words, i do not want to upload all PHP scripts on each subdomain, because is hard to manage.
1. i read that i need to point ServerAlias of the subdomain to *.example.com, in httpd.conf It is correct and enough?
2. i need to upload a .htaccess file on the subdomain's root to give it some instructions, maybe the same rewrite rules from the root?