WPLESS problem loading a page from SSL
-
Hello there,
I am having a website that in the checkout form I am using SSL but in all other pages I don’t.
I have these functions:
function vm_ssl_template_redirect() { $id = _THE_CHECKOUT_PAGE_ID if ( is_page( $id ) && ! is_ssl() ) { if ( 0 === strpos($_SERVER['REQUEST_URI'], 'http') ) { wp_redirect(preg_replace('|^http://|', 'https://', $_SERVER['REQUEST_URI']), 301 ); exit(); } else { wp_redirect('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 301 ); exit(); } } else if ( !is_page( $id ) && is_ssl() && !is_admin() ) { if ( 0 === strpos($_SERVER['REQUEST_URI'], 'http') ) { wp_redirect(preg_replace('|^https://|', 'http://', $_SERVER['REQUEST_URI']), 301 ); exit(); } else { wp_redirect('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 301 ); exit(); } } } add_action( 'template_redirect', 'vm_ssl_template_redirect', 1 ); function vm_checkout_page_ssl( $permalink, $post, $leavename ) { $id = _THE_CHECKOUT_PAGE_ID if ( $id == $post->ID ) return preg_replace( '|^http://|', 'https://', $permalink ); return $permalink; } add_filter( 'pre_post_link', 'vm_checkout_page_ssl', 10, 3 );[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
The problem is when the page loads the I get this error that the style-xxxxxx.css file coming from wp-less plugin is coming from http and the problem is appearing in the console from both chrome and firefox. Can you please let me know how can we fix it? I cannot seem to find a filter there.
Thank you,
The topic ‘WPLESS problem loading a page from SSL’ is closed to new replies.