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

drop-down with sub-category appear
Hello,

i know how to build a simple dro-down list, im looking for a code when im gonna choose

Wierd echo error?
Hi, i got the most wierd php error ever and i don't know why..
Code: echo "<t

my sql select id and then update problem.
I need to select some auto incremented ids out of a database and then use those id in a where statem

Sufficient protection from bad input?
I am writing a simple script to let people upload 'pages' of their own content, be it simply a few b

Material Issuing for receiving batch
Dear All experts in MM/ PP,

Material issuing from main stores to factory is currently usi

path to include folder
Hi everyone,

When I'm testing locally, I have to add the name of the site folder as part of t

Checking BOM Authorization Group
Hai Friends,

I have developed a mulitilevel BOM display report. End users have been assig

puting for loop in 1 value
hi ,

how do i put this code in 1 value:
Code: <?php
for ($i=1; $i<=5; $i

Multiple WHILE loops help
Hi there. I'm writing an application that is pulling and displaying results for real estate listing

SQl num_rows problem
when i try to count rows from an SQL select i get an warning

Code: [Select]$countviews = mysq

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