Hot answers tagged

38 votes

How do I simply make the whole site use a secure connection?

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 ...
user avatar
  • 407
14 votes
Accepted

How to force image URLs as HTTPS?

You can use file_url_transform_relative(): /** * Transforms an absolute URL of a local file to a relative URL. * * May be useful to prevent problems on multisite set-ups and prevent mixed * ...
user avatar
  • 89.4k
10 votes

redirect whole site to HTTPS

RewriteCond %{HTTPS} !=on # This checks to make sure the connection is not already HTTPS RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] # This rule will redirect users from their original ...
user avatar
  • 201
7 votes
Accepted

Drupal Commerce Authorize.net gateway and POODLE

The commerce_authnet module is using the PHP curl() functions to communicate with Authorize.net, and it does not explicitly requests the SSLv3 protocol in the curl options (see file commerce_authnet....
user avatar
5 votes
Accepted

Connection to AWS MySql server over SSL

Figured it out and required SSL via phpmyadmin admin interface for my users. There are my Drupal database params $databases = array ( 'default' => array ( 'default' => array ( ...
user avatar
5 votes

How to correctly configure settings.php to use reverse proxy and ssl termination

This should work for both Drupal 7 and 8. It's actually the global.inc for one of my Aegir set-ups, which gets injected into all hosted sites' settings.php files. <?php # global settings.php /** ...
user avatar
  • 1,980
5 votes
Accepted

How to force drupal 7 to load HTTPS assets?

I updated settings.php with: $base_url = 'https://'.$_SERVER['SERVER_NAME'];
user avatar
  • 147
4 votes

Is there any way to force https:// to be used for assets and still be able to define a theme CSS files in its .info file?

For a Drupal 7 site using Cloudflare CDN and a Bootstrap theme, this worked for me: Set the base URL in your settings.php file, without including http:// or https://. $base_url = '//my.domain.name'; ...
user avatar
  • 41
4 votes

How to have a secure HTTPS login form?

Given the way things are heading on the internet now, and Google making statements about weighing HTTPS sites higher than HTTP in the past couple of months, you might as well make it totally HTTPS. ...
user avatar
  • 26.8k
3 votes

drupal 7 SSL a lot of insecure urls

One solution, if you're wanting to force your site to always to use SSL, is to do it at the Apache level by adding this to your .htaccess: RewriteCond %{HTTPS} off RewriteRule (.*) https://%{...
user avatar
  • 26.4k
3 votes
Accepted

Drupal 7 site display unexpected symbols

Every time I have encountered this problem, it has been because I have page level caching enabled on admin/config/development/performance page compression enabled on admin/config/development/...
user avatar
  • 37.7k
3 votes
Accepted

redirect whole site to HTTPS

You might be interested in the htaccess module: Htaccess is a module which autogenerates a Drupal root htaccess file based on your settings. Drupal tries to provide a one size fits all ...
user avatar
  • 8,219
2 votes

Is there any way to force https:// to be used for assets and still be able to define a theme CSS files in its .info file?

You might need to set the base URL in the settings.php file, specifying the URL scheme. $base_url = 'https://my.domain.name';
user avatar
  • 21
2 votes

How to resolve the SSL error with local copy of site on Dev Desktop?

On the Config settings from Acquia Dev Desktop >> Preference >> Config: Now Select Apache Module (mod_php) and hit OK Button. That's All the SSL Connection Error has Fixed.
user avatar
2 votes

How to resolve the SSL error with local copy of site on Dev Desktop?

DevDestop now supports this. https://docs.acquia.com/dev-desktop2/sites Acquia Dev Desktop now provides simulated HTTPS support using a self-signed SSL certificate, which supports local testing and ...
user avatar
  • 121
2 votes

Page works with SSL, but not internally

Try this: $base_protocol = empty($_SERVER['HTTPS']) || strtolower($_SERVER['HTTPS']) != 'on' ? 'http' : 'https'; $base_url = $base_protocol . '://www.mysite.com'; Though you may need the Secure ...
user avatar
  • 4,053
2 votes
Accepted

Does Aegir 3 allow multiple SSL sites on the same IP Address?

Indeed it does. From the release notes: Aegir 3 now supports SNI for SSL.
user avatar
  • 164k
2 votes

Varnish has no SSL support; then what to use?

Content delivery platforms like CloudFlare and Fastly offer a wide range of SSL/TLS options. The question is, what are you trying to accomplish? Note that Varnish really won't do you any good for high ...
user avatar
  • 3,624
2 votes

Problem with SSL certificate

There are some known issues with Drupal 7.x in some server configurations particularly around PHP 5.6 and OpenSSL 0.9x due to changes in how PHP verifies SSL certificates. Acquia has some notes about ...
user avatar
  • 2,690
2 votes

Do you really need SSL on local dev environments?

It depends on the site. Some third party tech, services, etc require SSL to be enabled and working for basic functionality. Meaning for those cases any/all development/staging environments would need ...
user avatar
2 votes

How to force image URLs as HTTPS?

You could try altering your base_url by un-commenting the following line in settings.php and changing the http to https. /** * Public file base URL: * * An alternative base URL to be used for ...
user avatar
  • 29.7k
2 votes

Too many redirects error with https and domain access module

Just in case anyone stumbles upon this (or perhaps for my future self). The issue ultimately ended up being Cloudflare. If you use Cloudflare for any of your domains don't forget to include it in the ...
user avatar
  • 21
2 votes

Problem with ssl, broken site

In Drupal 7 you could set the $base_url='https://example.com'; in /sites/default/settings.php. For Drupal 8 it looks like $base_url has been removed in favor of trusted domain patterns which are ...
user avatar
  • 542
1 vote

AddThis Icons Being Blocked on SSL/HTTPS Site

/admin/config/user-interface/addthis/advanced Service URL's and you can put https instead of http and problem is fixed!
user avatar
  • 125
1 vote
Accepted

AddThis Icons Being Blocked on SSL/HTTPS Site

I ended up contacting AddThis and they told me the Drupal module is outdated, and to instead use this code: <script type="text/javascript" src="https://s7.addthis.com/js/300/addthis_widget.js"...
user avatar
  • 2,433
1 vote
Accepted

How to make links to private directory always use ssl?

Depending on where you've placed the above code (e.g. a hook_init invocation), it might not trigger for an anonymous user if caching is involved on your site. An alternative to this approach is to do ...
user avatar
  • 26.4k
1 vote

How to force drupal 7 to load HTTPS assets?

if everything(SERVER AND HOST SETTINGS) is ok just $conf['https'] = TRUE; in your settings.php. According to Enabling HTTP Secure (HTTPS) Drupal configuration : If you want to support ...
user avatar
  • 21k
1 vote
Accepted

SSL Issues with Mixed Content and Firefox

When you set $base_url, Drupal always uses it in email absolute links and whenever it has to build an absolute URL. I have many sites running full-HTTPS, with only the $base_url set to the https URL....
user avatar
  • 9,473
1 vote

drupal 7 SSL a lot of insecure urls

You could try the Secure Pages module. A small process which will redirect the required pages to a SSL version of the page.
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible