: Https force redirect is not working properly... All search pages are not redirecting on https I have bought SSL certificate from Namecheap and installed on Hostgator c-panel. Some organic search
I have bought SSL certificate from Namecheap and installed on Hostgator c-panel. Some organic search traffic pages are not redirecting on https. Https is not showing in Google Search. My .htaccess file is like as
# Use PHP55
AddHandler application/x-httpd-php55 .php
<IfModule mod_suphp.c>
suPHP_ConfigPath /opt/php55/lib
</IfModule>
# 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>
# END WordPress
# Always use https for secure connections
# Replace 'www.mydomain.in' with your domain name
# (as it appears on your SSL certificate)
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ www.mydomain.in/ [R=301,L]
More posts by @Heady270
1 Comments
Sorted by latest first Latest Oldest Best
You will obviously need to make sure you have done the two things that @Simon mentioned in comments. Namely to use your actual domain in the RewriteRule directive and to change the WordPress/Site address in the admin section.
However, you have put your redirect code in .htaccess in the wrong place! This is a show stopper. By placing the mod_rewrite directives at the end of the file, after the WordPress front-controller, they will never get executed (at least not for any WordPress URLs). So, the code you posted won't actually be doing anything!
You need to place the redirect code before the WordPress front-controller. ie. Before the # BEGIN WordPress section.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.