HTTPS to HTTP rewrite rules not working as expected

The SSL admin and login redirection should be done through the FORCE_SSL_ADMIN constant in wp-config.php: define(‘FORCE_SSL_ADMIN’, true); For further information: Administration Over SSL Aditionally, if you want be redirected to http when you’re logged and in the frontend, take a look at: Redirect WordPress front end https URLs to http without a plugin

Issues with forcing HTTPS

As you have, use Firebug with Firefox, or use the developer tools in Chrome or Safari or IE to see what’s loading on your site, the errors and work with the HTML. The main non-https errors I see are for fonts from Google and gstatic. So call your fonts in the @import style sheet or … Read more

Can’t access Admin Panel

You cannot revert this. You will need to export your database via PhpMyAdmin and find all of the “HTTPS” instances and replace them with “HTTP”. I would suggest using something like Dreamweaver or Notepad++ to ‘find and replace all’. After you have done that, import your database again.

Https and Http for iFrame

Because your server is HTTPS, the only way you can accomplish this is rendering the content on your server or getting the 3rd party to upgrade their server content to HTTPS. It’s just the rule of the Internet. To fix the mixed content issue, pull all the JS and HTML you need into your own … Read more

URLs not being output with https

Is the site running on Apache? If so you could put this in your .htaccess file <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.yoursite.com/$1 [R,L] </IfModule> also if you need SSL in your admin area and login pages put this into wp-config.php define(‘FORCE_SSL_ADMIN’, true); here’s another way that is more generic: RewriteEngine On … Read more

Admin sometimes redirects to HTTPS

Finally, after MONTHS I was able to solve it. Just add $_SERVER[‘REQUEST_SCHEME’] = ‘http’; $_SERVER[‘SERVER_PORT’] = 80; To wp-config.php, preferably before calling wp-settings.php Thanks to Daan Meijer for this. PS: It was a server-side error, probably something to do with PHP process manager such as php-fpm or mod_php. The hosting company solved it without the … Read more

Only execute function if SSL is set up properly

There is no fail proof way to know if the site support https without actually trying to send a request over https to it (wp_get_remote for example). HTTPS traffic can be terminated on a load balancer and the traffic between it and wordpress done over http, therefor it is not obvious you will find any … Read more

force https except one page/post

I just used this in the functions file in the end function force_ssl() { // Specify ID of page to be viewed on SSL connection if (is_page(8616) && !is_ssl () ) { header(‘HTTP/1.1 301 Moved Permanently’); header(“Location: https://” . $_SERVER[“SERVER_NAME”] . $_SERVER[“REQUEST_URI”]); exit(); } // All other pages must not be https else if (!is_page(8616) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)