0

This is my wordpress htaccess file code.After active ssl certificate now i want to redirect http to https.But it's not working.What is .well-known/acheme-challenge?This folder exist on my root folder.Can anyone help me

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !
^/\.well-known/pki-validation/[A-F0-9]  {32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !
^/\.well-known/pki-validation/[A-F0-9]  {32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule . /index.php [L]`enter code here`

# END WordPress

1 Answers1

0

Try this

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]

Please refer to https://serverguy.com/servers/redirect-http-to-https/

Alessio Cantarella
  • 5,077
  • 3
  • 27
  • 34
Yunus
  • 1
  • 2