Forums

add_rewrite_rule - simple url rewrite using wp function??? (1 post)

  1. thomask
    Member
    Posted 2 years ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic