Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

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

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

Full Member

10+ Year Member

joined:Dec 27, 2006
votes: 0

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?
11:44 pm on Nov 25, 2014 (gmt 0)


WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
votes: 236

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

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members