Https force not working for posts

Tgmgaming.com

Hi
Trying to force my site to be sure all the time.

So I’ve added force https code to the access file and it forces homepage to https but not any of the post.

I tryed doing it before the pre existing text but it dosnt redirect it.just come up with cannot find that doc

Any ideas?
Thanks

php_value display_errors Off
php_flag magic_quotes 1
php_flag magic_quotes_gpc 1
php_value mbstring.http_input auto
php_value date.timezone Europe/London
# BEGIN WordPress
# The directives (lines) between `BEGIN WordPress` and `END WordPress` are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

You may need to remove the second RewriteEngine On on your .htaccess file, so the code would look like this:

php_value display_errors Off
php_flag magic_quotes 1
php_flag magic_quotes_gpc 1
php_value mbstring.http_input auto
php_value date.timezone Europe/London
# BEGIN WordPress
# The directives (lines) between `BEGIN WordPress` and `END WordPress` are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
4 Likes

I hope this could help you too!

Thanks for this :smiley:

Now only some of the post are not secure but the older ones seems to work.

What have i done wrong :confused:

Because some of your images are still in the HTTP version of the URL. So you need to change the website URL to HTTPS in the WordPress dashboard settings.

3 Likes

Sorry me agan, I’m new to this ,

i think i done that and it’s on https:// but it says ! This site is not fully secure, that mean have to reupload image and pages to make it work ?

that should list ways to make ur site fully secure.

6 Likes

You will need to install Really simple ssl plugin on wordpress plugin dashboard after you follow the instruction above. The plugin will overwrite all http into https.

3 Likes

Thank you for your everybody that reply :slight_smile: all sorted now!

i just re upload the images that was still http// and it works a treat

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.