404 Redirects to my PRIVATE POSTS?!

Discussion in 'HTML & Website Design' started by riftshighway, Jul 11, 2008.

  1. #1
    Hello there!

    You can see my site at www.airsoftica.com

    To see what the 404 is doing, go to www.airsoftica.com/as;ldkjf;asld.html

    Isn't that weird? What can I do to fix this? I've already changed my 404.php and it doesn't seem to work. This started after I changed my permalink structure, so is there something I need to do with .htacess?
     
    riftshighway, Jul 11, 2008 IP
  2. nicangeli

    nicangeli Peon

    Messages:
    828
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Just showing a blank page here, I guess this is fixed.
     
    nicangeli, Jul 11, 2008 IP
  3. riftshighway

    riftshighway Active Member

    Messages:
    368
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    60
    #3
    No it's not fixed. It's probably just taking a long time to load (it loads 5 private pages).
     
    riftshighway, Jul 11, 2008 IP
  4. nicangeli

    nicangeli Peon

    Messages:
    828
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #4
    IE 7 displays a 404 error. FF3 displays a blank screen, it has finished loading.

    What do you mean by private pages? Pages you have to login as the admin to view?
     
    nicangeli, Jul 11, 2008 IP
  5. shenron

    shenron Notable Member

    Messages:
    4,965
    Likes Received:
    374
    Best Answers:
    0
    Trophy Points:
    295
    #5
    "Doh! I know this sucks but
    404


    I haven't gotten around to making that page yet."

    FF3 shows that.
     
    shenron, Jul 11, 2008 IP
  6. riftshighway

    riftshighway Active Member

    Messages:
    368
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    60
    #6
    Yes, private pages. Now I've got the 404 working, but strangely enough if you are logged into my site it gives you the wrong 404. This issue only shows up if you're logged in....
     
    riftshighway, Jul 11, 2008 IP
  7. therearentanynamesleft

    therearentanynamesleft Peon

    Messages:
    47
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    hmmmm
    is the 404 page a stand alone page, or is it a php include?

    if it is a php include, and you are using POST to get the 404 page included (if your 404 url looks like this "http://airsoftica.com/index.php?c=404")

    then you should look for code that is kinda like this

    off the top of my head...

    
    <?PHP
    
    if  ([check if session exists]) {
    
    if (isset($_GET['c'])) {
    
         if (file_exists  ('inc/' . $_GET['c'] . '.php')) {
    
              include('inc/' . $_GET['c'] . '.php');
    
         else
              include('path to the 404 you DONT want');
    
            
          }
       }
    }
    ?>
    
    PHP:

    change the red to the path to the php file you DO want
     
    therearentanynamesleft, Jul 11, 2008 IP
    riftshighway likes this.
  8. riftshighway

    riftshighway Active Member

    Messages:
    368
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    60
    #8
    Good call! You weren't 100% correct, but set me in the right direction.

    Basically while hacking and modding my site to the utter extreme I left in an extra <?php else : ?> prior to closing the loop which caused a massive amount of page info to be displayed (due to the loop) rather than taking people to the 404.

    Great help, rep added.
     
    riftshighway, Jul 12, 2008 IP