• Resolved Eric

    (@ekazda)


    I would like to redirect non-www to www by adding the following code to my site’s .htaccess file:

    RewriteCond %{HTTP_HOST} !^www\. [NC]
    RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    However, placing this code within the #WORDPRESS section of the .htaccess file seems to result in it being overwritten at random times.

    Is there a proper way to add code to the .htaccess that won’t be changes by this plugin?

    • This topic was modified 7 years, 6 months ago by Eric.
    • This topic was modified 7 years, 6 months ago by Eric.
    • This topic was modified 7 years, 6 months ago by Eric.
    • This topic was modified 7 years, 6 months ago by Eric. Reason: Trying to get code block to appear correctly
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi, your question is not related to this plugin. Did you speak to your host about this issue?

    Plugin Contributor wpsolutions

    (@wpsolutions)

    Hi @ekazda,
    This plugin will not change any .htaccess code which is outside of the following tags:

    # BEGIN All In One WP Security
    # END All In One WP Security
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Non-www to www: htaccess does not retain manual changes’ is closed to new replies.