If you’re looking to force SSL on all pages and have mod_rewrite enabled, you can add this code to your .htaccess file:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R,L]
this works for loading pages, but how do i modify the calling of things like web fonts and style sheets? (settings are set for https, rewrite in htaccess is there, but the pages are missing their style, and come up as non-secure at whynopadlock.com)
I looked at your page, and the styles appear to be there, everything loads ok, but I see the rewrite isn’t grabbing a URL in your themes stylesheet, so you have a mixed-security page.
Try this instead:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
jgs,
Below is my .htaccess.
Can you please tell me where to insert your code.
Thank you
Options +FollowSymLinks
# 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]
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://odedbenami.com/$1 [R,L]
</IfModule>
# END WordPress
jgs,
I just realized that the folks at my hosting company completely changed the content of my .htaccess file, perhaps they took out something that they shouldn’t have.
Below is the .htaccess file before they modified it.
Could you please tell me wether I should use the old or the new/modified and where to insert the code that you posted.
Thank you
Options +FollowSymLinks
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^odedbenami\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.odedbenami\.com$
RewriteRule ^(.*)$ “https\:\/\/odedbenami\.com\/$1” [R=301,L]
#RewriteBase /
#RewriteRule ^index\.php$ – [L]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Try this:
Options +FollowSymLinks
# 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]
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
# END WordPress
Where is the .htaccess file you’re modifying located?
Your /wordpress/index.php file appears to be missing.
Can you help me fix that?
Do you still have the zip file you installed from? If so, you could put a fresh copy of the index.php file in your WordPress directory.
I don’t.
Only a few days ago I updated from wordpress 3.5 to 3.5.1, but I used the automatic option, without downloading the zip.
If you’re using 3.5.1 you can download the archive here: http://wordpress.org/latest.zip
Extract the files on your machine, then FTP the index.php file into your /wordpress/ directory.
I just did.
Here’s what’s happening;
if I enter:
http://odedbenami.com
it changes it to https
but if I enter any of the pages, say
http://odedbenami.com/consultation
or without the http:
odedbenami.com/consultation
https is not enforced.