Redirect login e registarzione

#526970
  • Resolved Fabio Pescara
    Rank Math free

    Buongiorno
    Sto riscontrando un problema con i reindirizzamenti delle pagine di login e registrazione sul mio sito.
    Il redirect sulla pagina registrazione funziona male, ovvero si apre la pagina di login personalizzata anzi che quella di registrazione.
    Mntre il redirect sulla pagina di login, continua ad aprire la pagina di defoult di wordpress.

    Cosa non sta funzionando?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hello,

    Thank you for contacting Rank Math support, and sorry for any inconvenience that might have been caused due to that.

    Can you please explain the issue in detail?

    At the moment, all the URLs you shared don’t redirect to any pages. Also, the content of your login is showing a form that seems to be a form for user login and the same goes for your registration page.

    Please clear your website cache and check the content of the page again.

    If that doesn’t help, we might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    I tried logging into your admin dashboard but whenever we successfully logged in using the username and password you shared, it always goes back to the login form.

    Can you please confirm if this is the issue you are referring to?

    Looking forward to helping you.

    Sto provando in tutti i modi a cercare di reindirizzare le pagine di default ( login e registrazione ) senza successo .
    Uno dei problemi e appunto che se provo ad utilizzare un plug in come “profile builder” succede che reinirizza sulla mia pagina custom https://ngamertips.com/log-in/ , ma una volta inseriti i dati invece di riportami sul sito , porta alla pagina default di wordpress buggata, mi spiego meglio la pagina e quella di default ma senza gli spazi di inserimento credenziali , in alto centrale vedo solo la sezione della scelta lingua e basta.
    Senza nessun plug in, provando ad utilizzare il vostro strumento per i redirect , i redirect non funzionano. stessa cosa se provo a farlo del pannello amministrazione host ( Siteground) anche da li i redirect non funzionano.
    Altro problema che mi era capitato provando a fare un redirect che si presentava sempre la pagina default di wordpress, inserivo i dati, ma si apriva in loop un’altra pagina uguale senza darmi possibilità di entrare.
    Non riesco a capire dove é il problema.

    Hello,

    Please share your website FTP login in the sensitive data section so we can investigate it further from our end. If you are not sure, you may ask your hosting provider for the FTP login.

    Looking forward to helping you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    I’m not sure if I understood your point correctly.

    Can you please confirm if you want to redirect wp-login.php?redirect_to=https://ngamertips.com (WP default login page) and wp-login.php?action=register ( WP default registration page) to your custom login and registration pages?

    If so, please share you custom registration page as well, so that we can do that for you.

    Looking forward to hearing back from you.

    Thank you.

    il mio problema é che quando provo a reindirizzare le pagine default di wordpress rispettivamente:
    login= https://ngamertips.com/wp-login.php
    registrazione= https://ngamertips.com/wp-login.php?action=register
    e recupero password , sulle mie pagine custom, questi redirect non funzionano mi incasinano il sito.
    Ora sto provando a tamponare il problema cercando di bypassarle, ma questa cosa mi sta creando dei grossi problemi.
    Ho contattato l’assistenza di Siteground dove é ostato il sito, senza risultato.
    ora dato che uso il vostro plug in per la SEO, mi conviene se devo reidirizzare pagine farlo con il vostro plug in, ma se il servizio di redirect non funziona, é un grosso problema!
    Sicuramente sto sbagliando io qualcosa, vorrei capire cosa…
    le pagine da reindirizzare sono:
    Login: https://ngamertips.com/log-in/
    registrazione : https://ngamertips.com/register/
    recupero password: https://ngamertips.com/recupero-password/
    edit profile : https://ngamertips.com/edit-profile/

    quindi assegnare alle rispettive pagine default di wordpress, queste che ho indicato.

    Hello,

    I was unable to login to your WordPress admin panel due to 2 Factor Authentication. However, I’ve added the following code to your active theme’s funcitons.php file through FTP and the redirections looks to be working fine now.

    function rm_redirect_wp_default_urls(){
    
        $url="https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
        $login_page = home_url('/log-in/'); //custom login URL
        $lost_pass = home_url('/recupero-password/'); // custom lost-pass URL
        $register_page = home_url('/register/'); //custom register URL
        $edit_profile = home_url('/edit-profile/'); // custom edit-profile URL
        
        if ( ( strpos($url, "wp-login.php?action=lostpassword") ) && ( $_SERVER['REQUEST_METHOD'] == 'GET' ) ){
        	wp_redirect($lost_pass);
            exit;
        }
        if ( ( strpos($url, "wp-login.php?action=register") ) && ( $_SERVER['REQUEST_METHOD'] == 'GET' ) ){
        	wp_redirect($register_page);
            exit;
        }
        if ( ( strpos($url, "/wp-admin/profile.php") ) && ( $_SERVER['REQUEST_METHOD'] == 'GET' ) ){
        	wp_redirect($edit_profile);
            exit;
        }
        if ( (strpos($url, "wp-login.php") ) && !( strpos($url, "wp-login.php?action=register") ) && !( strpos($url, "wp-login.php?action=lostpassword") )   && ( $_SERVER['REQUEST_METHOD'] == 'GET' ) ) {
            wp_redirect($login_page);
            exit;
        }
    }
    add_action('init', 'rm_redirect_wp_default_urls');

    Please check the URLs and let us know if the redirections are now working properly for you.

    If they are working fine for you, please follow the guide below and move the code to the suitable place, so that you don’t lose them after theme update.
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Looking forward to helping you.

    Thank you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 9 replies - 1 through 9 (of 9 total)

The ticket ‘Redirect login e registarzione’ is closed to new replies.