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

IF Statement & Two Tables With Different Echoes
I'm retrieving two tables in a single query using UNION ALL, like so:

Code: $query = "SE

Export hangs
Hi all, please help

I have a Oracle 10.2.0.3.0 database. When I want to query the dba_segmen

generating random codes
Hi guys n gals,

I have a requirement to generate 250,000 unique codes...

These codes a

file downloaded can't be read !!
<?php
$fileName = 'mypic.jpg';
$mimeType = 'image/jpeg';
header('content-dispositio

echo $rows help
Hi all,

Hopefully something simple that I don't know!

I have this:

Code: [Selec

query based on 2 conditions
I want to select if the doc_type is either s OR f but this doesn't work:

Code: [Select]$query

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

serializing objects - loses methods - the point being?
Hi

I know that serializing an object will lose the methods. But whats the point in that? What

why isn't this PHP code working ???
it's suppose to find a name on the database.

<?php

$s = $_POST["lname&

unexpected T_VARIABLE error
Hey all! I'm getting an unexpected T_VARIABLE with the following function:

function getHighes

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