Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
Hi there,

I'm newbie using CouchCMS and I have issue with my website.
I want to redirect http://mysite.com to be https://www.mysite.com

I already update .htaccess with below script but it still can not opened https://www.mysite.com

# <IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# </IfModule>

Is anyone can help me what should I do, please?
Hi,

Please try using the following code in .htaccess -
Code: Select all
#If your site begins with 'www', uncomment the following two lines
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

#ssl only
RewriteCond %{HTTP:X-Forwarded-Proto} =http [OR]
RewriteCond %{HTTP:X-Forwarded-Proto} =""
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

If it still doesn't work, add the following statement to your 'couch/config.php' file -
Code: Select all
define( 'K_HTTPS', '1' );

Hope it helps. Please let me know.
2 posts Page 1 of 1
cron