WordPress.org

Ready to get started?Download WordPress

Forums

permalink rewrite error: "You should update your .htaccess now" (14 posts)

  1. rafaelvidal
    Member
    Posted 6 months ago #

    I have just installed WP and I'm experiencing issues with permalinks.
    When I try to activate any kind of rewritten, except the default one, the htaccess file is not generated and the following warning is displayed:

    You should update your .htaccess now.

    PERMISSIONS
    Files permissions seems to be correct, anyway I would appreciate if someone could tell specifically what permissions are expected for each dir and files (I have heard that dirs should be 775 and files 664).

    Since I can even upload pictures and add/edit files remotely using notepad++, filezilla, etc, I don't think it's an owner related problem.

    Tired of researching I'm ready for being directed by a specialist.

    Thanks

  2. esmi
    Theme Diva & Forum Moderator
    Posted 6 months ago #

    Since I can even upload pictures and add/edit files remotely using notepad++, filezilla, etc,

    That actually has nothing to do with file permissions and ownerships. Try creating an .htaccess file yourself and see if that helps.

  3. rafaelvidal
    Member
    Posted 6 months ago #

    I have tried...where should it be put?

    I have placed it in the root dir, but nothing happened. Then I tried on the my actual theme dir and same result.
    Always a 404 error.

  4. esmi
    Theme Diva & Forum Moderator
    Posted 6 months ago #

    What did you put in the .htaccess file?

  5. rafaelvidal
    Member
    Posted 6 months ago #

    I put the rules generated by WP...

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
  6. esmi
    Theme Diva & Forum Moderator
    Posted 6 months ago #

    Assuming WordPress is installed in your root folder, that .htaccess file should work. Have you spoken to your hosts about this? Check with them that mod_rewrite is running on your server.

  7. rafaelvidal
    Member
    Posted 6 months ago #

    Yes, my host does allow mod_rewrite and it's running.

    I'm not sure what's really going on although apparently my WP installation seems to be fine at all.

  8. In addition to having mod_rewrite enabled you also have to make sure your <Directory> section also contains AllowOverride All as well.

    Check with your host about that part. Once that's done then the rewrite rules should work.

  9. rafaelvidal
    Member
    Posted 6 months ago #

    I believe it has "AllowOverride All" allowed, do I check that on
    Apache config file? (httpd)

  10. do I check that on Apache config file? (httpd)

    Yep. It's different for different Linux/BSD environments but that should be in your Apache2 configuration file for your directory.

    I use Ubuntu LTS so I keep that /etc/apache2/sites-available but yours may be in a different location.

  11. rafaelvidal
    Member
    Posted 6 months ago #

    Jan D.,
    I just changed the following part of my http.conf file from "AllowOverride None" to "AllowOverride All", but nothing changed.

    #
    # Each directory to which Apache has access can be configured with respect
    # to which services and features are allowed and/or disabled in that
    # directory (and its subdirectories).
    #
    # First, we configure the "default" to be a very restrictive set of
    # features.
    #
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>

    Then I restarted apache server, but didn't work.

  12. I suspect that mod_rewrite isn't being called...

    Try making a backup copy of your .htaccess file and adding a line to it.

    http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritelog

    <IfModule mod_rewrite.c>
    RewriteEngine On
    # Log to a file:
    RewriteLogLevel 3
    RewriteLog "/some/path/here/rewrite.log"
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    And then visit your site. Hopefully you'll see some log data. If not then mod_rewrite may be disabled. Have verified that it's active via <?php phpinfo(); ?>

  13. rafaelvidal
    Member
    Posted 6 months ago #

    Htaccess does work on my host. I have other websites in this same server that use it.

    MOD_REWRITE
    It's enabled, check this image: http://snag.gy/uOAOA.jpg

    REWRITE LOG
    No log is being generated.

  14. rafaelvidal
    Member
    Posted 5 months ago #

    I have managed to resolve this issue by setting permissions to 775 on dir "httpdocs" which stores all WP files.
    The main issue with this is how open the website gets.

    Anyway, thanks for everybody attention.

Reply

You must log in to post.

About this Topic