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

Apart from cron
I need to run a php file every one hour. Is there any other solution apart from cron job?

Curly Bracket Delimeters.
I'd always believed that the starting and ending delimeters in preg_ functions had to be the same ch

Post, not working, please help
The error is:
Method Not Allowed
The requested method POST is not allowed for the URL /student

max function question
Hi All
Ihave a table that holds shipment numbers and dates like this

select * from

help with contest script
I would like to code a contest script to my site but i don't know how. Could someone just give me pu

fwrite error
Hi All,
Does anyone know what is causing the error in this code?

Code: <?
$error

Sharing PHP Sessions Across Domains
I am in the process of writing a script to share a php session across various domains I have.
The

Multiple server callbacks (NOT POSTBACKS)
Hello, I have 2 different javascript client side functions that are on timers. When the timers elap

php require help needed
Ok i tried to use the search funtion but the word require is everywhere.

i'm really new to cr

Adding Different Numbers From MySQL
Basically I have a mysql database with a couple prices as the following:

9.99
9.99
9.99

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