Please Advice: Want to edit functions.php to redirect registration page.

  • sghegde87



    I am thinking of running a forum in my WordPress+Graphene powered website and I have created my own login page and registration page..

    For this purpose and also as a security measure, I want to redirect all the request that come to ‘wp-login.php’ and wp-login.php?action=register pages to go to /custom-login-page and /custom-registration-page.

    I did a lot of googling and may be my searching skills are not good enough but found only this solution to add in the functions.php file.


    function possibly_redirect(){
    global $pagenow;
    if( 'wp-login.php' == $pagenow ) {

    I did this and still it didnt work. 🙁

    Could you guys please advice what can be done for this issue?? Help is much appreciated.


    Shiva G



    How about redirecting using .htaccess?



    Something like,

    RewriteCond %{HTTP_HOST} ^$ [OR]
    RewriteCond %{HTTP_HOST} ^$
    RewriteRule ^wp-login.php/?(.*)$ "$1" [R=301,L]

Viewing 3 posts - 1 through 3 (of 3 total)

  • You must be logged in to reply to this topic.