1

My new project will have dynamic sub-domain names for example: aa.mysite.com ; ac.mysite.com and etc

How can I use a file located in mysite.com/subdomains/index.php as default index.php on any requested subdomain *.mysite.com ?

Please mind - I dont want to redirect, just to load the mentioned index.php file

Please help, Thank you in advance

thecore7
  • 484
  • 2
  • 8
  • 29

1 Answers1

2

I guess this isn't possible with .htaccess, this should be done in your virtual host configuration of Apache.

Use wildcard virtualhosts to specify the documentroot for your dynamic subdomains.

A related question, not with .htaccess but for the apache configuration, is asked before: Virtualhost For Wildcard Subdomain and Static Subdomain

Community
  • 1
  • 1
Mark van Herpen
  • 347
  • 3
  • 12