WordPress.org

Ready to get started?Download WordPress

Forums

Permalinks 404 error (9 posts)

  1. hikkup
    Member
    Posted 4 years ago #

    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.

  2. esmi
    Forum Moderator
    Posted 4 years ago #

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

  3. hikkup
    Member
    Posted 4 years ago #

    ok, here is the link

  4. rooodini
    Member
    Posted 4 years ago #

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

  5. Shane G.
    Member
    Posted 4 years ago #

    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.

  6. hikkup
    Member
    Posted 4 years ago #

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

  7. oznola
    Member
    Posted 4 years ago #

    .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.

  8. hikkup
    Member
    Posted 4 years ago #

    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?

  9. oznola
    Member
    Posted 4 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.