WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] 404 error page not working (14 posts)

  1. Knowles2
    Member
    Posted 2 years ago #

    Hi all

    I got a problem with a word press site I have been developing, when I got to a page that should generate a 404 error page I am instead getting a brunch of code

    http://www.skateloughton.org/broken

    I am using the latest version of WordPress and Suffusion theme

    It not the recent updates as it was produce this error before I installed those.

    I have tried deactivating and reactivating plugins one by one but the same error was still being produce.

    I also added
    ErrorDocument 404 /htdocs/index.php?error=404
    ErrorDocument 404 /404.php
    to the .htaccess file at the beginning on the file as suggested by the codex, this did not solve it either.

    I tried change to the default theme, this produce the Twenty Eleven produce

    in -->
    
    	<footer id="colophon" role="contentinfo">
    
    			<div id="site-generator">
    								<a href="http://wordpress.org/" title="Semantic Personal Publishing Platform" rel="generator">Proudly powered by WordPress</a>
    			</div>
    	</footer><!-- #colophon -->
    </div><!-- #page -->
    
    </body>
    </html>

    I have tried all the different Permalink options and they all end up with the same result or a variation of the above.

    I have tried numerous solutions, I have found the internet and I have not be able to fixed this error, any help would be appreciated.

  2. Johnb81
    Member
    Posted 2 years ago #

    Can you put a screenshot of the error / bunch of code you are getting? When trying to request a non existing file on your website, there are no redirects (or it takes forever to redirect).

  3. Knowles2
    Member
    Posted 2 years ago #

    Hi

    Thanks for the comment, here a screenshot of the code I am getting;

  4. Johnb81
    Member
    Posted 2 years ago #

    You forgot to add a password in your FTP URL.

    ftp://username:password@ftpsite.com

  5. Knowles2
    Member
    Posted 2 years ago #

  6. Johnb81
    Member
    Posted 2 years ago #

    If you try to add the below to the .htaccess file in the WordPress root, does it work?

    ErrorDocument 404 "File not found"

    This should show only a text.

    The problem you are having seems like the web server is not parsing the code but returning it instead.

  7. Knowles2
    Member
    Posted 2 years ago #

    Unfortunately it did not work, I added the content of the htaccess file below;

    ErrorDocument 404 "File not found"
    # BEGIN s2Member GZIP exclusions
    <IfModule mod_rewrite.c>
    	RewriteEngine On
    	RewriteBase /
    	RewriteCond %{QUERY_STRING} (^|\?|&)s2member_file_download\=.+
    	RewriteRule .* - [E=no-gzip:1]
    </IfModule>
    # END s2Member GZIP exclusions
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    The code I am getting is the same as before.

  8. shirazdrum
    Member
    Posted 2 years ago #

    Post the content of your 404.php here. Th generated page is not complete, you have some html error causing that to begin with.

  9. Knowles2
    Member
    Posted 2 years ago #

  10. Knowles2
    Member
    Posted 2 years ago #

    Have anyone got any suggestion on what I can do to solve my problem

  11. wambamboo
    Member
    Posted 1 year ago #

    Hi did you manage to solve this?

  12. Knowles2
    Member
    Posted 1 year ago #

    No, i wasn't able to solve it, i almost certain it a server side problem through, the site ran fine on my own server at producing 404 errors, but the server people never got back to me and still haven't fixed it, sadly I do not have access to the server backend to investigate further. If you got any other ideas on what could be causing this please post.

  13. Johnb81
    Member
    Posted 1 year ago #

    The problem is server side. If you use a web debugger you will find out in the server response there is an HTTP Protocol violation, thus the page is broken.

    In fact the server does not respond with a 404 error but with an internal server error (500).

    Definitely this is not a WordPress issue.

  14. Knowles2
    Member
    Posted 1 year ago #

    Thanks John for Confirming my suspicions, will have to wait for the next committee meeting and suggest that I put the website on my own server, that way, may be other things will stop breaking every time I visit the site as well.

Topic Closed

This topic has been closed to new replies.

About this Topic