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

Internal class functions don't seem to get executed.
Hi. Can someone please put me out of my misery on this. I don't write much PHP and this has me baffl

Thread in PHP
Thread in PHP
Some basic use and basic code for thread in php
This is my question?

update 2 columns by doing inner 2-column query
Hi,
is something like this possible?

update contract_all set col1,col2 =
(

DOMDocument
Hello All,

I need to take an XML document, modify some of the nodes in it and then perform a

How To Make More Than One Redirection with PHP on the same page?
Hey im trying to do a direction page where it open differently link direction pages every time som

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

using variables in another page
I have a test database set up on localhost. I have a form that I can type a name into, hit the butto

restricting another login once you logout
Hello,

how can I restrict a page from login authenticating against info in a MySQL DB for a s

'grab_files', multiple extension?
hey guys,

can anyone suggest a way to make to following line of code look for files with more

Array help
Hello i got this code to fetch data from database but it is not working it displays
7
Array

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