Openshift redirects wp-admin to https

浪尽此生 提交于 2019-12-20 15:38:49

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!