The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Intermediate & Advanced SEO
    4. Apache not directing to 404?

    Apache not directing to 404?

    Intermediate & Advanced SEO
    2 2 753
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Bombbomb
      Bombbomb last edited by

      I have a PHP website that produces an actual page when /index.php/GarbageURL/MoreDirectories/Page.suffix/DirectoryAgain is typed in a browser.

      Why?

      How?

      For what purpose?

      The content and HTML is produced in the source, but the images and css are broken due to the location of the file, obvi. I don't understand what this default tendency is for.

      1 Reply Last reply Reply Quote 0
      • G-Force
        G-Force last edited by

        Hi Rory,

        That's not the default tendency of apache. If the file doesn't exist, it would normaly return a 404 error. You might have a .htaccess file on your server with some rewrite rule that allow such thing to happen. I might also be a misconfiguration trying to show a wrong default 404 page.

        Also, to fix your broken css/images/links when the page is in a subdirectory, you should use urls relative to the root of your domain, so instead of simply using href="css/main.css" you might want to use href="/css/main.css".

        Finaly, have you looked at your HTTP headers to see if this page was returning a 404 or a 200 code? For your default 404 page, you might want to look at this : http://httpd.apache.org/docs/2.0/mod/core.html#errordocument

        Regards,
        Guillaume Voyer.

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        • 404 errors
          DennisSeymour
          DennisSeymour
          0
          5
          136

        • Is it a problem to use a 301 redirect to a 404 error page, instead of serving directly a 404 page?
          lcourse
          lcourse
          0
          5
          2.0k

        • 301 page into a 404
          AlanMosley
          AlanMosley
          0
          5
          76

        • How do you find the source of a 404
          GPainter
          GPainter
          0
          7
          1.0k

        • Should i fix 404 my errors?
          Francisco_Meza
          Francisco_Meza
          0
          4
          137

        • 301 to 404
          KaneJamison
          KaneJamison
          1
          4
          1.5k

        • External 404 vs Internal 404
          deltasystems
          deltasystems
          0
          2
          764

        • Status Code 404: But why?
          ShaMenz
          ShaMenz
          0
          18
          1.4k

        Get started with Moz Pro!

        Unlock the power of advanced SEO tools and data-driven insights.

        Start my free trial
        Products
        • Moz Pro
        • Moz Local
        • Moz API
        • Moz Data
        • STAT
        • Product Updates
        Moz Solutions
        • SMB Solutions
        • Agency Solutions
        • Enterprise Solutions
        • Digital Marketers
        Free SEO Tools
        • Domain Authority Checker
        • Link Explorer
        • Keyword Explorer
        • Competitive Research
        • Brand Authority Checker
        • Local Citation Checker
        • MozBar Extension
        • MozCast
        Resources
        • Blog
        • SEO Learning Center
        • Help Hub
        • Beginner's Guide to SEO
        • How-to Guides
        • Moz Academy
        • API Docs
        About Moz
        • About
        • Team
        • Careers
        • Contact
        Why Moz
        • Case Studies
        • Testimonials
        Get Involved
        • Become an Affiliate
        • MozCon
        • Webinars
        • Practical Marketer Series
        • MozPod
        Connect with us

        Contact the Help team

        Join our newsletter
        Moz logo
        © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
        • Accessibility
        • Terms of Use
        • Privacy