Forum Moderators: phranque

Message Too Old, No Replies

Subdomain(s) using an unique source of PHP scripts (root)

         

rowtc2

9:10 am on Nov 25, 2014 (gmt 0)

10+ Year Member



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?

phranque

11:44 pm on Nov 25, 2014 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



you will also need a plan for canonicalizing hostnames and url paths between/among the sites.