Website Direction...


Posted on 16th Feb 2014 07:03 pm by admin

I recently used this code to try and make it so the page loads as http://www.domain.com/ when you type in http://domain.com
I thought this code would make sense and be a solution, but just loops.
Could anyone explain please.
Thanks in advance..

Code: <?php
$server = $_SERVER['HTTP_REFERER'];
if ($server == "http://www.domain.com/") {
echo "Hello World";
} else {
header("Location: http://www.domain.com/");
}
?>

No comments posted yet

Your Answer:

Login to answer
245 Like 37 Dislike
Previous forums Next forums
Other forums

IP question
ive got 2 ip addresses both global from same user how would i detect if they are local to each other

The page should be expire when cilck back button
hi,
i'm new to php world.
i create user registration page.
when i submit it,data goes to my

CRM?
I think that's what they're called. Customer Management System? Anyway. Is there any good free ones

random generation
hi

i need help with generating this

numbers from 1-12

i want to generate in ran

Is there a function ... auto send IP
Is there some function that can be sent to a ddns service that returns the ip address of a ddns forw

Change Sort Order to Display Newest File First
Hi Guys,

I have a page that sorts the contents (PDFs) of a directory and displays them on the

Guixt issue
Hello all,

We are experiencing the following problem with Guixt:

Some transact

Echo Tweaking help!
HI. I would like to have the output of the entered variables repeat forever, but it's stopping at th

rdns with php
I am trying to build a script that will show all of the different domains that are hosted on the sam

How to Detect it is public_html or httpdocs?
How to check whether it is cPanel or Plesk?

If it found public_html perform <?php incl

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash