• I need very simple url rewrite, e.g. rewrite /admin to /wp-login.php and i do NOT want to use .htaccess but just functions.php.

    I have tried

    add_action('init', 'mc_admin_url');
    function mc_admin_url() {
    add_rewrite_rule('admin', 'wp-login.php','top');
    }

    and many other variants with slashes at the begining etc. but nothing seem to work. Can anyone help me?

The topic ‘add_rewrite_rule – simple url rewrite using wp function???’ is closed to new replies.