Simple PHP script to detect if the current webpage is the root domain and output different HTML if so.

In Progress

Description

Hi,

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.

Kind regards,

Mike

Skills: PHP

See more: php detect current page, php detect domain, php detect include, php detect post, detect current page php, detect domain php, php detect domain name, php detect homepage, php detect feed, php detect operating system, php script detect operating system, php webpage, php homepage template, html codes for website, html code for homepage of any website, basic website html code, php detect current page root, php detect root page, current site root php script, php detect domain root, detect homepage php, php detect root domain, detect browser php, detect current html page php, php detect page subfolder

Project ID: #242476

6 freelancers are bidding on average $32 for this job

value4u

Hi, I did many similar script for controlling multi-domain,... I get it done shortly (less than 2 hours). Thank you.

$30 USD in 0 days
(272 Reviews)
8.2
anode

Ready to do it right now.

$40 USD in 1 day
(106 Reviews)
6.1
MasterBo

Sir, it is only few lines. It can be done in a couple of minutes. Please see PM.

$30 USD in 0 days
(40 Reviews)
5.9
IceStormz

Hi this can be easily done i am ready to start now

$30 USD in 0 days
(42 Reviews)
5.1
Alkobazik

It can be done in few minutes. Please Check PMB

$30 USD in 0 days
(15 Reviews)
4.7
webprogramer

Dear Sir, that's very easy job, 15 minutes more and i will post you an example of it. Regards, ism

$30 USD in 0 days
(3 Reviews)
2.5