I need a PHP script which outputs two different HTML codes. One set of HTML code if the current page is the root domain (i.e. [url removed, login to view]) and a different HTML code if the current webpage is not the root domain (i.e. [url removed, login to view]).
The script needs to be dynamic in that it is transferable to any website/domain so hard coded domain names cannot be used.
I plan on using a PHP include to include the PHP script at the footer of a website template (php).
The idea is that I can display one version of a footer for the homepage and a different version of the footer for the rest of the site. This is mainly so I can add rel="nofollow" to footer links on the rest of the site but not the homepage.
The two different HTML codes simply consist of basic HTML text and href links.
I imagine this script is extremely simple for someone familiar with PHP.
My server runs on Linux with PHP 4.4.4.
I need this script ASAP - today if possible.
Thanks for looking.