WordPress.org

Ready to get started?Download WordPress

Forums

iThemes Security (formerly Better WP Security)
404 errors on all pages except home with nginx (1 post)

  1. Jon Scaife
    Member
    Posted 1 year ago #

    I'm running BWPS on nginx on a VPS. When I add the rules to my nginx.conf I get 404 errors on all pages except the homepage.

    For what it's worth I can fix them by commenting out the following lines...

    # if ($http_cookie !~* "wordpress_logged_in_" ) {
    # set $susquery 2$susquery;
    # set $rule_2 1;
    # set $rule_3 1;
    # }
    # if ($args !~ "^loggedout=true") { set $susquery 3$susquery; }
    # if ($susquery = 4321) { return 403; }
    # rewrite ^/osrlogin/?$ /wp-login.php?glclc3pz4s1cy40zle1qs redirect;
    # if ($rule_2 = 1) { rewrite ^/osradmin/?$ /wp-login.php?glclc3pz4s1cy40zle1qs&redirect_to=/wp-admin/ redirect; }
    # if ($rule_2 = 0) { rewrite ^/osradmin/?$ /wp-admin/?glclc3pz4s1cy40zle1qs redirect; }
    # rewrite ^/osrregister/?$ /wp-login.php?glclc3pz4s1cy40zle1qs&action=register redirect;
    # if ($uri !~ "^(.*)admin-ajax.php") { set $rule_3 2$rule_3; }
    # if ($http_referer !~* wp-admin ) { set $rule_3 3$rule_3; }
    # if ($http_referer !~* wp-login.php ) { set $rule_3 4$rule_3; }
    # if ($http_referer !~* osrlogin ) { set $rule_3 5$rule_3; }
    # if ($http_referer !~* osradmin ) { set $rule_3 6$rule_3; }
    # if ($http_referer !~* osrregister ) { set $rule_3 7$rule_3; }
    # if ($args !~ "^action=logout") { set $rule_3 8$rule_3; }
    # if ($args !~ "^glclc3pz4s1cy40zle1qs") { set $rule_3 9$rule_3; }
    # if ($args !~ "^action=rp") { set $rule_3 0$rule_3; }
    # if ($args !~ "^action=register") { set $rule_3 a$rule_3; }
    # if ($args !~ "^action=postpass") { set $rule_3 b$rule_3; }
    # if ($rule_3 = ba0987654321) {
    # rewrite ^(.*/)?wp-login.php /not_found redirect;
    # rewrite ^/wp-admin(.*)$ /not_found redirect;
    # }

    http://wordpress.org/extend/plugins/better-wp-security/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic