WordPress.org

Ready to get started?Download WordPress

Forums

Site Defaulting to WordPress Error Doc(s) (4 posts)

  1. unpoedic
    Member
    Posted 8 years ago #

    Though I am not certain as to exactly why, there seems to be a link between my having updated .htaccess to designate a preferred permalink and the default error documents called up. Since adding this text to the .htaccess file

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /within/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /within/index.php [L]
    </IfModule>

    in order to achieve a name- and date-based permalink

    http://www.unpoedic.com/within/2006/03/31/sample-post/

    any misfires throughout the domain, not limited to the sub-directory in which WordPress is located, call up the WordPress 404 file.

    I also password-protected said directory while I continue to tinker. Now any prompt for 404 or 401 errors prompts for a password, because the error pages sought (the WordPress error doc[s]) are beyond that gate. Consequently, visitors cannot even get a proper 404 error on my site; every action is interpreted as an attempt of unathorized access.

    To remove the password from this directory would not solve the problem entirely; somehow the WordPress error files are overriding my own.

    ___

    Contents of .htaccess:

    ErrorDocument 404 /error404.html
    ErrorDocument 401 /error401.html

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /within/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /within/index.php [L]
    </IfModule>

  2. petit
    Member
    Posted 8 years ago #

    Well, given the password protection, your link isn't very helpful. No way of seeing what's gong on.

    Do you have a late version of WordPress?
    If so, you should let WordPress write the .htaccess for you.
    The route:
    o Create an empty .htaccess file in your blog root.
    ( where the wp-config.php etc. resides )
    o Make sure it's writable by the web server ( 666 will do )
    o Go to Options/Permalinks and "Update permalink structure". WordPress will write what it needs in .htaccess

    If you have a custom 404.php in your themes folder, that should be used - if not the standard 404 will be used.

  3. unpoedic
    Member
    Posted 8 years ago #

    The above link was not intended to be "helpful" beyond demonstrating the permalink format desired; it is in fact copied and pasted from the WordPress/Options/Permalinks page. I am afraid I concentrated more on presenting rather than illustrating the problem.

    Which, thanks entirely to your input, is resolved. In providing WordPress with an .htaccess file of its own, the issue cleared up immediately. I greatly appreciate your assistance, despite the fact that my lack of thoroughness made it a more difficult problem to address than it might have otherwise been.

    Thank you.

  4. petit
    Member
    Posted 8 years ago #

    Good to hear, thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags