Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2008
    Location
    Newcastle, UK
    Posts
    92
    Thanks
    3
    Thanked 7 Times in 5 Posts

    Why does my index.php page act as a 404 Error page?

    Okay, this is strange. I've had the code re-typed, and it still happens.
    My index page keeps acting as a 404 error page throughout...

    http://kwivia.co.uk/

    http://kwivia.co.uk/akdfhgkajdhfglkj...dfjgjadfgjhdgf

    http://kwivia.co.uk/sdfhajsdhfuwY39YQWO8R7YW8EYFGO`IHSFGZUSYDG

    Why does this happen?
    I have no 404.shtml page present, yet, it still does this. My code is as below:

    Code:
    <html>
    <head>
    <!-- <meta http-equiv="Refresh" content="1; url=http://kwivia.co.uk/h/"> -->
    <title>Coming Soon!</TITLE>
    <style type="text/css">
    body{
    	margin-top: 0.3em;
    	background-color: #000000;
    }
    
    a:visited{
    	color: #ff4400;
    }
    a:link{
    	color: #1ebfff;
    }
    </style>
    </head>
    <center><font face="Lucida Grande" color="#ffffff"><h1>
    <img src="pdev.jpg" width="300" /><br>
    <?php
    // countdown function
    // parameters: (year, month, day, hour, minute)
    countdown(2009,7,20,0,0);
    
    //--------------------------
    // author: J. Griffiths on behalf of Kwivia
    // website: kwivia.co.uk
    //
    // Note:
    // Unix timestamp limitations 
    // Date range is from 
    // the year 1970 to 2038
    //--------------------------
    function countdown($year, $month, $day, $hour, $minute)
    {
      // make a unix timestamp for the given date
      $the_countdown_date = mktime($hour, $minute, 0, $month, $day, $year, -1);
    
      // get current unix timestamp
      $today = time();
    
      $difference = $the_countdown_date - $today;
      if ($difference < 0) $difference = 0;
    
      $days_left = floor($difference/60/60/24);
      $hours_left = floor(($difference - $days_left*60*60*24)/60/60);
      $minutes_left = floor(($difference - $days_left*60*60*24 - $hours_left*60*60)/60);
      
      // OUTPUT
    
      echo "Only ".$days_left." days left. So close! ";
    }
    ?></h1><br>
    <b>Once I have 1,000 followers on <a href="http://twitter.com/Kwivia">Twitter</a> I will choose a random person from my followers and 
    they will win a hot drinks machine for their Sims 3 game, as well as some Kwivia goodies.</b><br>
    <h6><a href="/help">Get Help</a></h6>
    (Yes, I am aware of the badly-coded code, I couldn't care less at this moment.)
    Beyond Moodle

  • #2
    Senior Coder djm0219's Avatar
    Join Date
    Aug 2003
    Location
    Wake Forest, North Carolina
    Posts
    1,300
    Thanks
    4
    Thanked 203 Times in 200 Posts
    Check for the presence of a .htaccess file that is defining 404 and directing it to index.php.
    Dave .... HostMonster for all of your hosting needs


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •