• Hi,
    in recent weeks I have encountered a problem of rewriting on .htaccess and in more detail on RewriteRule and RewriteBase, which changed the root url and therefore made the site work only in the folder written at that point, reporting Internal server error on the other languages ??of the site, including root.

    Here is the right file:

    # BEGIN WordPress
    # The directives (lines) between BEGIN WordPress and END WordPress are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    And this as it was modified:

    # BEGIN WordPress
    # The directives (lines) between BEGIN WordPress and END WordPress are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /it/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /it/index.php [L]
    </IfModule>

    I have to understand how to solve the problem without the possibility of repeating it, otherwise my customers risk finding themselves without a reachable site.

  • The topic ‘Problem with .htaccess on RewriteRule and RewriteBase’ is closed to new replies.