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

Help with file_get_html
The following code gives the expected results:

<html>
<head&g

SAP Project Module
I have seen in the SAP Project Module,plan cost and budget are not equal and even difference is sign

PHP, Arrays & A Lot Of Confusion
I've been doing basic PHP work on sites for a few years now, but I've never been tempted to learn ho

form problem
Hi all, I think this is going to be easy to resolve but for I have been looking at it to long and I

Error when call dll from oracle
Hi all, please help me!

I have dll write C language, I want call it from oracle procedur

The control with ID 'ace' requires a ScriptManager on the page
I'm trying to add a simple AlwaysVisibleControlExtender to my page, but it's not working. I get the

mail()
Hi all. I have a problem with emails. I am trying to set up a mail system where customers can subscr

Form validation with functions
Hi there

I am trying to make a very simple form validation function. I currently have the fol

A href problem under php
Hello...

I tried to explain the issue in an earlier post.. but was not clear enough....

Help with looping
I have a comma separated list of colors taken from a database ($ICo) and a directory of images named

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