Hi all,
I have found a simple solution to this…
I created a simple plugin:
<?php
/* Plugin Name: Content over SSL
* Description: Swap to https if required
* Author: Leo Seccia
* Version: 1.0 */
add_filter('the_content', 'my_ssl');
function my_ssl($content)
{
return (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") ? ereg_replace("http://" . $_SERVER["SERVER_NAME"], "https://" . $_SERVER["SERVER_NAME"], $content) : $content;
}
?>
and then I also updated my wp-config.php:
define('FORCE_SSL_ADMIN', true);
All the best,
Leo
Hello again,
If I am to write a plugin to do this:
– which hooks should I use?
– how can I set the page_on_front in code?
– at what stage page_on_front is used to establish what content to serve to the client?
Thanks in advance.
Leo