WordPress.org

Support

Support » How-To and Troubleshooting » Permalinks 404 error

Permalinks 404 error

  • My main page is okay but every post I click on brings a 404 not found error. After reading a lot on the subject it seems I should re-create a htaccess file.

    So I made a 1.htaccess, then moved it to the server (does this have a .txt extension?) and renamed it .htaccess in the root dir.

    I’m new at this, and i still get those 404 errors.

    So Im thinking I didn’t generate the htaccess?? So, how do I do this properly.

Viewing 8 replies - 1 through 8 (of 8 total)
  • esmi

    @esmi

    Forum Moderator

    Unless you provide a link to your site, no one will be able to offer much in the way of specific help.

    ok, here is the link

    How did you generate your .htaccess file? WordPress can generate it for you if you give it write permissions on the root directory.

    Hi,

    Reset your desired permalink from wordpress admin area and add this code in htaccess of your blog/site:

    # BEGIN WordPress
    
    <IfModule mod_rewrite.c>
    ErrorDocument 404 /index.php?error=404
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    Now, check with your blog posts and pages.

    Thanks,

    Shane G.

    is htaccess a text (.txt) file? Does it need to be saved inal txt way

    .htaccess needs to be saved as .htaccess without a file extention and it is a text file.

    also, it has to be in the directory where you have wordpress installed.

    the script above now gave an internal error (500), I removed htaccess and at least got tyhe blog mainpage back. Isn’t WP supposed to replace this htaccess file if I delete it?

    if it has write permission to the directory i think it should rewrite .htaccess

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Permalinks 404 error’ is closed to new replies.
Skip to toolbar