Rewriting logout URL to /logout/[id]
-
Hey guys!
I’m trying to rewrite the logout URL to “logout/[id]”, i’ve managed to do this pretty easy with:
RewriteRule ^logout/(.*)$ /wp-login.php?action=logout&redirect_to=/&_wpnonce=$1 [L]
However now i’m trying to display the logout link, at the moment my code is:
<?php $uri = wp_nonce_url( site_url("logout/", 'login'), 'log-out' ); ?> <li class="logout"><a href="<?php echo $uri;?>" title="Logout"><span>Logout</span></a></li>
Which renders the logout URL as:
https://website.com/logout/?_wpnonce=%5BID%5DBut what i need is:
https://website.com/logout/%5BID%5DAny suggestions?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Rewriting logout URL to /logout/[id]’ is closed to new replies.