Non-www to www: htaccess does not retain manual changes
-
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?
Viewing 2 replies - 1 through 2 (of 2 total)
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.