WordPress.org

Ready to get started?Download WordPress

Forums

https page getting nonsecure items warning with IE (3 posts)

  1. gretchenmeyer
    Member
    Posted 5 years ago #

    Hi, I have one https page on my site. There are a few lines of code that are causing this page to get the "This page contains both secure and nonsecure items. Do you want to display the nonsecure items?" warning in IE:

    <link rel="alternate" type="application/rss+xml" title="Austin Pets Alive! RSS Feed" href="http://www.austinpetsalive.org/blog/feed/" />
    <link rel="pingback" href="http://www.austinpetsalive.org/blog/xmlrpc.php" />
    <link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.austinpetsalive.org/blog/xmlrpc.php?rsd" />
    <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://www.austinpetsalive.org/blog/wp-includes/wlwmanifest.xml" />
    <link rel="stylesheet" href="http://www.austinpetsalive.org/blog/wp-content/plugins/sociable/sociable.css" type="text/css" media="screen" charset="utf-8"/>

    Interestingly, the calls to form the links to the stylesheets (bloginfo('template_url'); and bloginfo('stylesheet_directory');) seem to realize when on my https page and they return a link to the stylesheet with an https.

    But these others don't.

    I'm not sure how to get around this. Has anyone successfully dealt with this issue? Thanks in advance!

  2. frontdesk
    Member
    Posted 4 years ago #

    Gretchen, I visited your site and I see that you resolved the issue. I have a similar situation.

    I have a single page ("contact") that I want to be HTTPS, so I configured my .htaccess as follows:

    NOTE: I am running on a shared host ISP

    [BEGIN .HTACCESS SNIPPET]

    Options +FollowSymLinks -MultiViews
    RewriteEngine on
    #
    # Redirect to force SSL and trailing slash on bad links to donate-now page
    RewriteCond %{SERVER_PORT} !=443 [OR]
    RewriteCond %{REQUEST_URI} !/$
    RewriteRule ^contact/?$ https://www.mydomain.net/contact/ [R=301,L]
    #
    # Redirect to add missing trailing slash unless URL ends with a "filetype"
    RewriteRule ^(([^/]+/)*[^./]*[^/])$ http://www.mydomain.net/$1/ [R=301,L]
    #
    # Redirect all non-canonical hostname requests to canonical domain, preserving SSL/non-SSL
    RewriteCond %{HTTP_HOST} !^www\.mydomain\.net$
    RewriteCond %{SERVER_PORT}s ^(443(s)¦[0-9]+)$
    RewriteRule ^(.*)$ http%2://www.mydomain.net/$1 [R=301,L] 
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    [END .HTACCESS SNIPPET]

    My goal was that whenever a user goes to http://www.mydomain.net/contact then that page should be HTTPS, and the above .htaccess does that by forcing the HTTP to become HTTPS. However, I still get the 'nonsecure items' warning in IE when going to this page.

    If I do a VIEW SOURCE of my /contact page I can see that the WP-generated links to my theme/stylesheet/javascript files only have HTTP, so that is probably why I am getting the 'nonsecure items' message.

    I noticed on your site that you successfully not only force your /donate page to be HTTPS but that you no longer cause the 'nonsecure items' warning to be displayed in IE, and if I do a VIEW SOURCE or your /donate page I can see that your WP-generated links to theme, stylesheet, etc., have a HTTPS prefix.

    How can I similarly get my non-HTTPS WP links to be generated by WP as HTTPS for this single /contact page within my WP site?

    All suggestions appreciated

  3. dawning
    Member
    Posted 4 years ago #

    Any luck with this? I too have this issue and it's driving me a little bit nuts.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.