Where is the .htaccess file??? (6 posts)

  1. happyhoureffect
    Posted 1 year ago #

    I spoke with our Yahoo hosting rep tonight and they have told me that it appears that there could be an issue with our permalinks as we get a 404 Not Found error for every page on our website, minus the home page. We have the default twenty thirteen theme activated right now.

    I have read through the documentation that talks about finding the .htaccess file and deleting its contents as a way to fix this no content displaying issue. However, when I login into my file manager in my Yahoo hosting account, where I can see all the files, I don't see a .htaccess file that I can edit. The instructions on Codex were: The result of clicking one of those links is that the page loads with all the surroundings (header, footer, sidebar), but instead of a page of posts, there is an error message: "Sorry, no posts match that criteria."
    This is due to a glitch in the .htaccess file that WordPress generates. To fix it, delete the contents of your .htaccess file and re-create it.
    In the Control Panel, go to Manage > Files (More Info on Editing Files)
    Click the link to your .htaccess file to edit its contents
    Copy the contents of the file and paste it to a text file in a text editor. This is a precaution in case your .htaccess file has manual entries for redirects, denials or other handy htaccess tricks
    Delete all contents from your .htaccess file and click the Update File button.
    In the Control Panel, go to Options > Permalinks.
    Click the Update Permalink Structure button to freshly generate new rewrite rules for your permalinks.
    Test the results using a link that had previously broken.
    Add any manual htaccess entries back in your file (Place manual htaccess entries before the # BEGIN WordPress or after # END WordPress lines.)
    You may also perform similar steps by deleting the .htaccess files from the server, creating a fresh empty .htaccess file, changing its permissions to 666, and then in Options > Permalinks generate a new set of htaccess rules by clicking the Update Permalinks Structure button.

    Can anyone help me locate this file or tell me which folder its located in so that I can try to do the above steps?


  2. amsgator
    Posted 1 year ago #

    It is in the same folder as your WordPress files (if it is created). It gets created when you enable permalinks, or you can manually create it yourself

    Open notepad and add this

    # 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]
    # END WordPress

    Then save it as htaccess.txt. Upload it to your server and rename it as .htaccess

  3. happyhoureffect
    Posted 1 year ago #

    Does it matter which folder it goes into? Or can it go into the main WordPress file?

  4. happyhoureffect
    Posted 1 year ago #

    I uploaded it to just the top level WordPress file folder. I also tried to rename the file, but I received an error message that its an invalid file name. Any other suggestions about how to fix the fact that all of our pages are not displaying?

  5. amsgator
    Posted 1 year ago #

    Are you on a Linux or Windows server? If it's Linux you need to ask your host why it is saying it's not a valid file name.

    I also recommend using an FTP client like FileZilla and not the built in file manager on your hosting account.


  6. amsgator
    Posted 1 year ago #

    It goes in whatever directory you installed wordpress in.

Topic Closed

This topic has been closed to new replies.

About this Topic