The Guru42 Universe

Guru 42 Universe map and travel guide

User Tools

Site Tools


How to simply make the whole site HTTPS?

If you want to redirect all of your pages to be forced to use SSL then add this to your .htaccess file.

# Redirect to HTTPS RewriteCond %{HTTPS} off RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

his should be placed directly after RewriteEngine on if you have no previous rewrites.

 #Redirect without WWW
 RewriteCond %{HTTP_HOST} .
 RewriteCond %{HTTP_HOST} !^www\. [NC]
 RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

 #Redirect to HTTPS
 RewriteCond %{HTTPS} off
 RewriteCond %{HTTP:X-Forwarded-Proto} !https
 RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] 

Then, in the settings.php: $base_url = '';

If you don't set up a redirect from http: to https: you may face a content duplication issue which affects SEO rankings.

To ensure you use a trusted SSL Certificate, Namecheap is offering 1-year free PositiveSSL limited to 1 cPanel primary domain for newly created account, and up to 49 new subdomains or addon domains per account. To install it, please visit the Namecheap SSL plugin.

Sign in to allow cPanel to download the list of SSL certificates you have in your account with Namecheap. You'll be able to install newly purchased certificates and install/renew already active ones.

Important: If an SSL certificate is already activated, you can install it through “Namecheap SSL” only if the domain (common name in CSR) is hosted in this cPanel. Installation of an already-active SSL will require reissue (activation from scratch).

Why does writing to my own site give me:

You don't have permission to access /doku.php on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.


It All Starts Here -|- Brain Dumps Blog -|- Guru 42 News Portal -|- Managing Technology -|- Learning Technology -|- Contact the Guru


Copyright | Tom Peracchio | 42 | Tech thoughts | A little bit crazy | Technology History | geek made simple

Copyright | Tom Peracchio | The Guru's Blog | Learning Technology | Technology History | Cranky Cynic
ssl.txt · Last modified: 2018/07/08 22:24 (external edit)