1

My site is now using a SSL certificate but i have about 300k pages with insecure urls (http) - What is the best and most efficient way of fixing this problem?

The problem is the dynamic content is referencing HTTP content. The site is already forcing SSL.

1
  • Welcome to Drupal Answers! The best and most efficient way is rather subjective. You should also make clear which insecure URLs you are seeing, since dynamic content is supposed to generate URLs using l(), which doesn't output absolute URLs in most of the cases.
    – apaderno
    Commented May 2, 2015 at 5:32

3 Answers 3

3

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://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

That's probably the quickest way. The best way is subjective; your needs might be different depending on priorities (e.g. for performance reasons you might want to force many static pages to HTTP).

1

As Shawn Conn says, the easiest thing to do would be to force SSL for your entire site at the server level. There is minimal performance overhead to SSL encryption for modern processors so if you've already paid for the certificate there's little reason not to do it. Also this will prevent expensive application-level redirects to secure/un-secure pages as the case may be.

1
  • These don't solve the problem. The problem is the dynamic content is referencing HTTP content. The site is already forcing SSL. Commented May 1, 2015 at 16:39
1

You could try the Secure Pages module.

A small process which will redirect the required pages to a SSL version of the page.

Not the answer you're looking for? Browse other questions tagged or ask your own question.