Archana Sharma
Archana Sharma

Reputation: 2071

WordPress multisite home redirection issue using SSL

I am working on a WordPress network site and added SSL. Now my home page has redirection issue. Rest of the pages works properly. For now, I am not able to login to the admin panel.

I have used permalink as "postname". Inside the database, I have changed the site and home URL to "https://mysiteurl.com".

Please suggest the required changes I need to place to redirect my home properly.

Upvotes: 1

Views: 64

Answers (1)

MEDZ
MEDZ

Reputation: 2295

Please add this code to your .htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

then add this line of code at the end of your wp-config.php:

define('FORCE_SSL_ADMIN', true);

UPDATE

If you use nginx include this in your configuration file:

server {
  listen 80;
  server_name example.com www.example.com;
  return 301 https://example.com$request_uri;
}

Upvotes: 1

Related Questions