php - Display different content based on domain -


i run 2 domains on same server. both websites use same files.

is possible utilize javascript or jquery or else display page content based on domain user accessing from?

for example. if user arrives "www.site1.com" can make page display different css template if access "www.site2.com".

i hope makes sense. thanks.

in php: get current domain

in javascript: get current domain name javascript (not path, etc.)

then can if/else statements in either php or javascript , display content accordingly.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

How can I fetch data from a web server in an android application? -

jquery - How can I dynamically add a browser tab? -