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

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

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -