HTTP to HTTPS
-
Having a couple issues when attempting to redirect from HTTP to HTTPS. The site is a subdomain that I use for testing purposes. i’ll call it my.example.com for this post.
1) After going into the admin page and changing the WordPress Address URL and Site Address URL to https://my.example.com, the settings get saved, the session times out and forces me to close/reopen the browser to see the website. This is fine except that I lose the ability to reach my admin login. Any attempts to locate the URL time out and/or redirect me to the site address.
2) I am also having an issue with the 301 redirect code in htaccess. I am using the following but I can’t seem to place it correctly within htaccess so that it works:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ https://www.my.example.com/$1 [L,R=301,NC]I have the standard code that comes after #Begin WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>as well as the firewall rules, etc added from All-In-One WP Security. It could possibly be a plugin conflict but its also likely I am not placing the 301 redirect correctly.
3) I am also having a problem with the CSS in my theme breaking after changing the URLs to https://. In IE, the site looks semi-normal but my font.css is not reflected and a few items in my main css file. In Chrome/Firefox the site has no CSS at all and shows just the index of the pages. The CSS files are called with the get_template_directory function in my header.php file.
Any help would be appreciated,
Thanks
- The topic ‘HTTP to HTTPS’ is closed to new replies.