Jump to content

[SOLVED] Detecting domain?


Azu

Recommended Posts

Would somebody please tell me how I can use PHP to detect the domain that is being used? Or just detect the full URL? Because I have more then 1 domain and I want to redirect the others to the first one, so that google won't think I am using duplicate content and penalize me for it.

 

So like either a way to detect what the domain is (E.G. domain2.com) so that I can redirect to domain1.com

 

Or just a way to detect if it ISN'T domain1.com, and redirect to domain1.com if it isn't?

 

Because I like to register more then 1 domain for common misspellings, like the way google has gooogle.com redirect to google.com

 

So.. please tell me how I can somehow detect this in PHP I would appreciate it thanks ^^

Link to comment
https://forums.phpfreaks.com/topic/52940-solved-detecting-domain/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.