Web Hosting Forum | Lunarpages

Author Topic: Accidental HTTPS gets blank page.  (Read 5991 times)

Offline rvicker

  • Spacescooter Operator
  • *****
  • Posts: 38
    • http://www.vicker.com
Accidental HTTPS gets blank page.
« on: June 14, 2016, 06:31:56 AM »
I've got some users that are using WordPress (so PHP) on their sites and are not using SSL.

The problem is if someone keys in HTTPS... instead of HTTP... they get a blank page since SSL is not activated and would not apply to the PHP (per LunarPages) pages anyway.

Is there a way to redirect HTTPS back to HTTP or present the PHP pages anyway?
Roger Vicker, CCP

*** Vicker Programming and Service *** Have bits will byte *** www.vicker.com ***
Do not adjust your mind. The fault lies with reality.

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6265
Re: Accidental HTTPS gets blank page.
« Reply #1 on: June 14, 2016, 09:01:19 AM »
It depends on precisely which server and how it's set up, but one of the two following .htaccess entries might work:

Code: [Select]
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Code: [Select]
RewriteEngine On
RewriteCond %{SERVER_PORT} 443
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Visit My Site

E-mail Me
-= From the ashes shall rise a sooty tern =-


Share |