WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] How to modify .htaccess for custom 404 on subdomain? newbie questions.

[Resolved] How to modify .htaccess for custom 404 on subdomain? newbie questions.

  • These are a total newbie questions. I will appreciate advice. (I did look at the codex and Apache.org sites for info first.)

    1. How should the command to use a custom 404 error page be written into the .htaccess when WordPress is installed in a subdomain?

    On my site a mistyped url returns a plain text Apache 404 error instead of the custom 404 page in the Kubric theme. WordPress is installed in a subdomain (e.g. www.wordpress.domain.com) and not a directory (e.g. www.domain.com/wordpress/). In FTP, the subdomain is a folder on the site /domain/wordpress.

    Do I use the format from the codex for a directory?

    ErrorDocument 404 /wordpress/index.php?error=404

    or is there some other way for a subdomain?

    2. Where in the .htaccess file do I insert the code? i.e. Should the 404 page code go before or after the WordPress permalinks, or does it matter?

    There was no .htaccess file until WordPress generated one when permalinks was activated. (It’s located in the subdomain’s folder. There’s no .htaccess in the site’s root directory.) There’s a blank line at the top. Then a bunch of code in between

    # BEGIN WordPress
    [ permalinks commands edited out for this post]
    # END WordPress

    I will appreciate advice.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] How to modify .htaccess for custom 404 on subdomain? newbie questions.’ is closed to new replies.