Title: 404.php &#8212; Mysterious Sub-Sub-Subfolder Error.
Last modified: August 19, 2016

---

# 404.php — Mysterious Sub-Sub-Subfolder Error.

 *  Resolved [sallymcdonald](https://wordpress.org/support/users/sallymcdonald/)
 * (@sallymcdonald)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/404php-mysterious-sub-sub-subfolder-error/)
 * Hey everyone, I’m having a very strange problem at the moment with my 404 page.
   When I visit a fake subfolder such as:
    **[http://www.example.com/wordpress/abc/](http://www.example.com/wordpress/abc/)**
   It works perfectly.
 * When I visit a fake sub-subfolder such as:
    **[http://www.example.com/wordpress/abc/abc/](http://www.example.com/wordpress/abc/abc/)**
   It still works perfectly!
 * But if I visit a fake sub-sub-subfolder, (Or anything higher than a sub-sub-sub,)
   Such as:
    **[http://www.example.com/abc/abc/abc/](http://www.example.com/abc/abc/abc/)**
   It only works halfway. My ‘404 Error’ image shows up, but the accompanying text,‘
   Sorry, that page wasn’t found.’, doesn’t show up at all, as if the text was never
   there.
 * Everything else works perfectly, the header, the sidebar, the footer … Everything
   except the text.
 * I know this isn’t normal behaviour, so how do I go about fixing it? Here is my
   404.php’s code:
 *     ```
       <?php get_header(); ?>
   
       <div id="container">
   
       <div class="imagetitle">
       <img src="http://www.example.com/wordpress/404error.gif" alt="404 Error" title="404 Error" /></div>
       <?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
   
       <?php endwhile; ?>
       <?php else : ?>
       <div class="post">
       <h3>Sorry, that page wasn't found.</h3>
       </div>
       <?php endif; ?>
       </div>
   
       <?php get_sidebar(); ?>
   
       <?php get_footer(); ?>
   
       </div>
       </body>
       </html>
       ```
   

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [sallymcdonald](https://wordpress.org/support/users/sallymcdonald/)
 * (@sallymcdonald)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/404php-mysterious-sub-sub-subfolder-error/#post-839595)
 * Er, anyone have any insight …?
 *  Thread Starter [sallymcdonald](https://wordpress.org/support/users/sallymcdonald/)
 * (@sallymcdonald)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/404php-mysterious-sub-sub-subfolder-error/#post-839614)
 * I’ve discovered something strange … When I switch my permalink structure from**/%
   postname%/** to **/%category%/%postname%/**, my 404 page works perfectly every
   time.
 * It also works when I use simply **/%post_id%/** … Just never when I use **/%postname%/**
   on its own. Very strange.
 * Here’s to hoping someone responds.
 *  Thread Starter [sallymcdonald](https://wordpress.org/support/users/sallymcdonald/)
 * (@sallymcdonald)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/404php-mysterious-sub-sub-subfolder-error/#post-839633)
 * I’m just going to bump this. I’ve been working for hours, trying to figure this
   out on my own … But I’m not having much luck! 🙁
 *  Thread Starter [sallymcdonald](https://wordpress.org/support/users/sallymcdonald/)
 * (@sallymcdonald)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/404php-mysterious-sub-sub-subfolder-error/#post-839644)
 * If anyone’s willing to help, I’d be about ready to send them a cash reward by
   now! 😛
 *  Thread Starter [sallymcdonald](https://wordpress.org/support/users/sallymcdonald/)
 * (@sallymcdonald)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/404php-mysterious-sub-sub-subfolder-error/#post-839649)
 * Never mind, I figured it out. [No thanks to you guys. :/ ]
 * I modified the 404.php page as so, and everything works perfectly now.
 *     ```
       <?php get_header(); ?>
   
       <div id="container">
   
       <div class="imagetitle">
       <img src="http://www.example.com/wordpress/404error.gif" alt="404 Error" title="404 Error" /></div>
   
       <div class="post">
       <h3>Sorry, that page wasn't found.</h3>
       </div>
       </div>
   
       <?php get_sidebar(); ?>
   
       <?php get_footer(); ?>
   
       </div>
       </body>
       </html>
       ```
   

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘404.php — Mysterious Sub-Sub-Subfolder Error.’ is closed to new replies.

## Tags

 * [404.php](https://wordpress.org/support/topic-tag/404-php/)
 * [problem](https://wordpress.org/support/topic-tag/problem/)

 * 5 replies
 * 1 participant
 * Last reply from: [sallymcdonald](https://wordpress.org/support/users/sallymcdonald/)
 * Last activity: [17 years, 10 months ago](https://wordpress.org/support/topic/404php-mysterious-sub-sub-subfolder-error/#post-839649)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
