Title: add_rewrite_rule &#8211; simple url rewrite using wp function???
Last modified: August 19, 2016

---

# add_rewrite_rule – simple url rewrite using wp function???

 *  [thomask](https://wordpress.org/support/users/thomask/)
 * (@thomask)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/add_rewrite_rule-simple-url-rewrite-using-wp-function/)
 * 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.

## Tags

 * [add_rewrite_rule()](https://wordpress.org/support/topic-tag/add_rewrite_rule/)
 * [url rewrite](https://wordpress.org/support/topic-tag/url-rewrite/)

 * 0 replies
 * 1 participant
 * Last reply from: [thomask](https://wordpress.org/support/users/thomask/)
 * Last activity: [16 years, 4 months ago](https://wordpress.org/support/topic/add_rewrite_rule-simple-url-rewrite-using-wp-function/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
