0

Currently having problem: if I send someone a link, for example www.domain.com and he clicks it, default browser Safari or Opera is opened but site cant be reached, If that same browser I alter domain with https:// in front of it, then website is loaded well.

There is no problem with loading from chrome.

So as I guess there is a problem with redirection from www. to https://www.

My website is wordpress, and hosted on aws. Please suggest with further actions.

nika
  • 59
  • 1
  • 8

1 Answers1

0

Apache servers: virtual host file(httpd.conf)

  1. Open your Apache configuration file. Possible locations include /etc/httpd/conf/httpd.conf (Apache 2/httpd), /etc/apache2/sites-enabled/ (Apache 2.4), or /etc/apache2/apache2.conf (Apache on Ubuntu).

  2. Add a rewrite rule to the VirtualHost section of your configuration file similar to the following:

    RewriteEngine On RewriteCond %{HTTP:X-Forwarded-Proto} =http RewriteRule .* https://%{HTTP:Host}%{REQUEST_URI} [L,R=permanent]

  3. Save your Apache configuration file.

  4. Restart Apache.

Akash Agrawal
  • 2,219
  • 1
  • 17
  • 38