Title: Function Reference/auth redirect
Last modified: August 21, 2016

---

# Function Reference/auth redirect

 *  [elboden](https://wordpress.org/support/users/elboden/)
 * (@elboden)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/function-referenceauth-redirect/)
 * Hi,
 * I need a function that will redirect a client if the client isn’t logged in, 
   but I don’t want the client to be redirected to /wp-login.php, but to another
   WordPress-install located on a subdomain of mine.
 * I don’t know very much PHP, but with Google I found this function:
    [http://codex.wordpress.org/Function_Reference/auth_redirect](http://codex.wordpress.org/Function_Reference/auth_redirect)
 * And I was wondering if it would work if I edited it so it would redirect to another
   URL than /wp-login.php. But I don’t know how? Or if this is the best method of
   doing it…?
 * `<?php auth_redirect(); ?>`
 * Would you please give me tip on how to do it? 🙂
 * Thanks,

The topic ‘Function Reference/auth redirect’ is closed to new replies.

## Tags

 * [function](https://wordpress.org/support/topic-tag/function/)
 * [login](https://wordpress.org/support/topic-tag/login/)
 * [require()](https://wordpress.org/support/topic-tag/require/)

 * 0 replies
 * 1 participant
 * Last reply from: [elboden](https://wordpress.org/support/users/elboden/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/function-referenceauth-redirect/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
