Support » How-To and Troubleshooting » [Resolved] Exclude subdirectory from custom 404

[Resolved] Exclude subdirectory from custom 404

  • I am using a theme that handles a custom 404 page for unknown URL’s. The trick is, I need to exclude a couple sub-directories from being handled by the 404 page. I use some sub-directories to host images and HTML content for email marketing, etc.

    I have done tons of searching, and I’ve tried several different redirect rules in the .htaccess file, but I can’t get it to work. Is this something I need to edit directly in the 404.php. file? Can anyone help me out with the rules I would need?

    The sub-directories I need excluded are /content and /images (and potentially a couple more.)


Viewing 1 replies (of 1 total)
  • Ok, I figured this out, and it was so stupid.

    The problem all lied in where I was storing the files on my Media Temple web host.

    My site hierarchy was basically like this:


    I was creating my images directory right under “mysite.com”. I later realized that if I created the directories under “mysite.com/html” it would work. But I wouldn’t have to add “/html” in the URL.

    So if I create a directory and add content to /mysite.com/html/images/whatever…, and I create a link that says “mysite.com/images/whatever.jpg”, it will display without me making any changes to .htaccess file, or any of my wordpress settings. I was just creating my directories in the wrong place… such a stupid thing to overlook.

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Exclude subdirectory from custom 404’ is closed to new replies.