Viewing 9 replies - 16 through 24 (of 24 total)
  • Plugin Author AITpro

    (@aitpro)

    I will add this as an option in BPS Login Security in the next version.

    @aitpro,

    how I can use this code you mentioned earlier in this thread to secure my site???

    // Simple Query String Login page protection
    function example_simple_query_string_protection_for_login_page() {
    $QS = ‘?mySecretString=foobar’;
    $theRequest = ‘https://’ . $_SERVER[‘SERVER_NAME’] . ‘/’ . ‘wp-login.php’ . ‘?’. $_SERVER[‘QUERY_STRING’];

    // these are for testing
    // echo $theRequest . ‘
    ‘;
    // echo site_url(‘/wp-login.php’).$QS.’
    ‘;

    if ( site_url(‘/wp-login.php’).$QS == $theRequest ) {
    echo ‘Query string matches’;
    } else {
    header( ‘Location: https://’ . $_SERVER[‘SERVER_NAME’] . ‘/’ );
    }
    }
    add_action(‘login_head’, ‘example_simple_query_string_protection_for_login_page’);

    thanks
    anik

    Plugin Author AITpro

    (@aitpro)

    thanks a lot ??

    will you plz let me know that is BPS works as a complete security suite or do I need to add some other layer/ plugin to the site… plz recommend anything good

    anik

    Plugin Author AITpro

    (@aitpro)

    We only use BPS Pro. ?? We do not suggest other security plugins so that we remain neutral out of diplomacy.

    thank you ??

    I played around with this and there is a much simpler way to do this all in this one simple function below without having to muck around with anything else (create unnecessary folders, redirects, pages, etc.).

    Hi AITpro, would I ad this to

    Theme’s functions.php file without having to modify/hack the wp-login.php file directly.

    like you suggest in the post above?

    Plugin Author AITpro

    (@aitpro)

    Yes, you would add the code to your Theme’s functions.php file and add the Query string that you want to use. Keep in mind that you should only use this code if you do NOT allow anyone else to register, comment, login to your WordPress website.

    a thousand thank u’s. No I be the only one needing to access the site.

Viewing 9 replies - 16 through 24 (of 24 total)
  • The topic ‘Changing /wp-admin url path’ is closed to new replies.