php - http_host with and without www -


I have a message to appear in PHP, if the domain is already out of some existing ones redirected to the account .

For example, if I'm domain www or non www, then I'm trying to run:

  if ($ _SERVER ['HTTP_HOST']! = ( 'Xxx Co.uk' & amp; www.xxx.co.uk '))   

However, it seems like working like i xxxx.co.uk (which is a Other domains point to their account) If the content still does not appear

What is obvious, something is clear from above?

Use "" instead of "'

  ( $ _SERVER ['HTTP_HOST']! = ("Xxx.co.uk" & amp;   

If the above does not work then try one at the bottom

  if (($ _SERVER ['HTTP_HOST']! = "Xxx.co.uk") & amp; amp; ($ _SERVER ['HTTP_HOST']! = "Www.xxx.co.uk")) < / Code>   

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -