https redirect

How can i set up a https redirect with .www
any ideas?
this is the current .htaccess
 
please help
 
<IfModule mod_rewrite.c>
RewriteEngine on
# Uncomment if you have a .well-known directory in the root folder, e.g. for the Let's Encrypt challenge
# https://tools.ietf.org/html/rfc5785
#RewriteRule ^(\.well-known/.*)$ $1 [L]
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
 
Thank  you
Michael Zoldan Basic on 11/20/20 at 07:46 in Server - hosting
2 Answer(s)
You can use it
RewriteCond %{HTTP_HOST} ^yourdomain.com [NC]
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [L,R=301]

Example:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^moosocial.com [NC]
RewriteRule ^(.*)$ https://www.moosocial.com/$1 [L,R=301]
# Uncomment if you have a .well-known directory in the root folder, e.g. for the Let's Encrypt challenge
# https://tools.ietf.org/html/rfc5785
#RewriteRule ^(\.well-known/.*)$ $1 [L]
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
Anh Quoc Basic on 11/22/20 at 20:53
Thank you it's working now :) 
Amar Vora Basic on 12/31/20 at 02:15
Cookies on mooCommunity - Social Networking Script.
This site uses cookies to store your information on your computer.