.htaccess file – how it should look?

  • Hello all

    I have been struggling with some malicious code being added to my config file, and as a result, it seems that the .htaccess file changes as well.

    The question is do you find anything wrong with my HTML file here? it is the .htaccess after I have clear the rouge code from my config file:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # 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>

    # END WordPress

    Thanks in advance
    And hope to clear this problem once and for all
    :)

  • Hi there, you’ll get a more informed answer about this issue over at the support forums for sites using the open source WP software. Head over to https://wordpress.org/support/ where you’ll find documentation and users who have more experience with the software you are using. If you don’t have a username on the ORG forums you can register one on the top of that page.

    This support forum you’ve posted to assists users with free websites hosted on the WPcom platform. WPcom (where we are ) and WP are separate entities with different documentation and support forums. More information about the differences can be found here: https://wordpress.com/support/com-vs-org/

    Best wishes

  • The topic ‘.htaccess file – how it should look?’ is closed to new replies.