问题
In general option in wordpress, I have changed the wordpress directory to be on http://mywebsite.com but wordpress dashboard is still in htpps causing mixed content warning and images in dashboard are not displayed even after disabling mixed content filter on firefox.
I this is my .htaccess file
Options +FollowSymlinks
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} ^443$
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1 [R=301,L]
# BEGIN WordPress
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
</IfModule>
What is the possible solution to overcome this problem.
回答1:
There is a setting in your wp-config.php file that directs all admin traffic over https. You would need to disable that option for your admin panel to work correctly.
FORCE_SSL_ADMIN needs to be false:
define('FORCE_SSL_ADMIN', false);
solves the issue. See relevant WordPress Codex pages:
- http://codex.wordpress.org/Administration_Over_SSL
- http://codex.wordpress.org/Function_Reference/force_ssl_admin
来源:https://stackoverflow.com/questions/22685369/openshift-redirects-wp-admin-to-https