How to redirect OJS site to HHTP

I just moved to SSL, how to let a domain forcibly redirect to hhtp?
PLease guide

Hi @editor.pij

You may redirect HTTP requests to HTTPS in 2 ways.

  • You may use htaccess rules to get this; For ex;
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

You may find more examples on stackoverflow.

  • Secondly, you may use config.inc.php file in OJS root folder to set it.


Currently, I use config.inc.php configuration without having any problems.

Regards,

2 Likes

I used the second way, and it seems fixed. Thanks for the reply.