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

Cant display mysql data
Hey all,

I am learning php and my first goal is to create a simple CMS. At the moment I am st

Writing Windows Device Drivers with C
Yes: one of the nice features of C is void*. You can put anything there and get anything out. Very

bind error during socket programming
i am kinda new to socket programming. wrote the below code for a server. but getting the bind error

Parse Error Help
Hello, I got the parse error "Parse error: syntax error, unexpected ',' in register.php on line

help with insert
Hi there,

I am trying to insert some data into a database, but for some reason, it is not ins

Custom CMS
This is a big custom CMS script I'd like to develop and would like some help atleast figuring out wh

Login logout link help
Hi all,

Im new to php and Im having trouble creating a login/logout link for my page that dis

problem with php mysql query
Hi guy's...

I'm totally lost here..because don't have any idea how to make a query for grab r

PL/SQL: ORA-00947: not enough values error message
Hi all i am getting Error(25,63): PL/SQL: ORA-00947: not enough values error message when executing

Mysql error message
help me find out what this error message means:

"Duplicate entry '0' for key 'PRIMARY'&q

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