Having a few issues getting things to work after changing wordpress from http to https on a windows sever. The web.config file is a bit of a mare to work with and the hosting company seems to think that changing http to https in wordpress settings is the only change necessary. currently I can only get the site to load css/js files on any pages other than the homepage by using default permalinks. and when I try adding http to https redirects in the web-config it causes even more problems. I've exhausted google so any advice appreciated.

  • define('FORCE_SSL_ADMIN', true); – Pranav Bhatt Jul 21 '16 at 9:30
  • hi, yes that's already in my wp-config file - the issue I think is having to use web.config rather than htaccess – steve555555555555 Jul 21 '16 at 9:57

for anyone interested the hosting company is going to convert wp install to linux so that should sort things.

found this plugin https://wordpress.org/plugins/really-simple-ssl/ which could be good for anyone having issues on linux.

| improve this answer | |

Put this in your web.config:


<rule name="HTTP to HTTPS redirect" stopProcessing="true">
                    <match url="(.*)" />
                        <add input="{HTTPS}" pattern="off" ignoreCase="true" />
                    <action type="Redirect" url="https://{HTTP_HOST}/{R:1}"
                        redirectType="Permanent" />
                <rule name="Add Strict-Transport-Security when HTTPS" enabled="true">
                    <match serverVariable="RESPONSE_Strict_Transport_Security"
                        pattern=".*" />
                        <add input="{HTTPS}" pattern="on" ignoreCase="true" />
                    <action type="Rewrite" value="max-age=31536000" />
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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