I have a woocommerce website that is using https. The https if being redirected using a 302 redirect and I need to change this to a 301 redirect. I have the “Force SSL (HTTPS) on the checkout pages (an SSL Certificate is required).” option checked in the woo commerce settings and my htaccess file is below

What’s the best way to change from a 302 to 301 redirect?

# BEGIN WordPress
<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
# Forcing HTTPS
RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.aransweatersdirect.com/$1 [R,L]

Read more here: How to redirect a HTTP site to HTTPS site using 301 redirect instead of 302


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , , ,

Wordpress related questions and answers: