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..
Did you know?Explore Trending and Topic pages for more stories like this.

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

Extracting Long text from message class with parameters
Hi,

I would like to extract the long text from a message class. However, the long text ha

Help with search.php
Hello All

I need the search engine on a site I am building at the moment to display the searc

database design
Hi,

I got a page which allow candidate to type in their previous working experience,
I let

MASS PM
Hello all, I'm trying to send mass private messages to users in my database but keep getting an erro

first id from db not showing
I have a php script which displays the content of a mysql table as a html table with sorting, delete

Is STL important?
I'm just starting programming and I've made it until the Standart Template Library. But the chapter

Ajax Error since Upgrading to 3.5
Ever since upgrading my site to .NET 3.5 (I needed LINQ), I've been getting this annoying error on o

Wierd if else problem
Hi guys,

this probably aint wierd for you, but it seems like php is playin up to me. may b i

How to calculate days from variable date?
This will be easy for one of you gurus. I want to fetch the date from a variable date, for example:<

matching numbers inside ( )
I know I can match numbers by just [0-9]+, so I thought matching numbers inside ( ) would be somethi

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