https
Did you change FROM http?
Thread Starter
Kanth
(@srikanthpulluru)
Yes, url has been chaged from http:// to https://
How did you do that in WP?
Thread Starter
Kanth
(@srikanthpulluru)
I am Running wordpress on hostgator server, before it was http, i requested hostgator support team to activate SSL on my website url.
After that we added this code
# BEGIN SSL
RewriteEngine on
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}$1 [R=301,L]
# END SSL
on .htaccess file
in wp-config file we added
define(‘FORCE_SSL_ADMIN’, true);
define(‘FORCE_SSL_LOGIN’, true);
define(‘RELOCATE’,true);
define(‘WP_HOME’,’https://site.org/’);
define(‘WP_SITEURL’,’https://site.org/’);
Thanks&Regards,
Srikanth
Okay, so … You didn’t edit the DB.
Go into your database and look at the wp_blogs table – see if it’s https there.
Thread Starter
Kanth
(@srikanthpulluru)
I gone through wp_blogs table on my database, and i dint find any Http:// or https:// simply
domain: site.org
if i change that domain to https://site.org i am getting error
Thanks for any Help in advance so where will be the problem? how i am getting two url’s site.org/wp-adminwp-admin. may i know the root cause for this problem, Thanks again
Thread Starter
Kanth
(@srikanthpulluru)
dint find any solution to solve the above issue, please anyone assist me how to solve the issue here is my .htaccess code
# Use PHP 5.4
AddType application/x-httpd-php54 .php
# BEGIN s2Member GZIP exclusions
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{QUERY_STRING} (^|\?|&)s2member_file_download\=.+ [OR]
RewriteCond %{QUERY_STRING} (^|\?|&)no-gzip\=1
RewriteRule .* - [E=no-gzip:1]
</IfModule>
# END s2Member GZIP exclusions
# BEGIN SSL
RewriteEngine on
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}$1 [R=301,L]
# END SSL
# BEGIN WordPress
RewriteEngine on
RewriteBase /
RewriteRule ^index\.php$ - [L]
# uploaded files
RewriteRule ^siteslogin$ https://site.org/wp-login.php [NC,L]
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule . index.php [L]
<FilesMatch "\.pdf$">
header set x-robots-tag: noindex
</FilesMatch>
# END WordPress
I can’t reproduce this. I have SSL for login on my main domain and it’s working as expected, no issues.
# BEGIN SSL
RewriteEngine on
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}$1 [R=301,L]
# END SSL
That’s not a great way around it.
RewriteEngine on
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}/$1 [R=301,L]
You’re missinfg a / between the URI and the $1
(Mind you I do it this way:
RewriteCond %{HTTP_HOST} ^site.org
RewriteCond %{SERVER_PORT} !443
RewriteRule ^(.*)$ https://site.org/$1 [R,L]
)
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}$1 [R=301,L]
That is the problem. IMO, in this case {REQUEST_URI} and $1 are the same thing. Do one OR the other, not both.
Oh! Hah! thanks, jkhongusc!
Thread Starter
Kanth
(@srikanthpulluru)
Thanks a lot Its fixed my problem :):)