0

I have two domain name, DomainA and DomainB When visitor call with DomainA, Site Title Tag, Meta tag are change depend on DomainA keywords and also DomainB. How do I do that with PHP?

Mg Linn
  • 45
  • 5

1 Answers1

1

You could check against the $_SERVER superglobal variable to find out what was sent in the request headers, specifically in this case $_SERVER['HTTP_HOST'] or $_SERVER['SERVER_NAME']. Based on this, you could in theory then assign anything dynamically based on this information.

You can read more about $_SERVER in php's documentation here, and I'd recommend having a look at this beautifully detailed answer, in terms of choosing which to rely on.

Community
  • 1
  • 1
d0ug7a5
  • 692
  • 4
  • 7