title: I wanted to remove query string from the URL in wordpress?
body: <blockquote>
    <p>Here is my query string URL <strong><a href="http://localhost/new_test/sample-page/?log=YWRtaW4K&amp;secret=YWRtaW4hQCMxMjM=" rel="nofollow noreferrer">http://localhost/new_test/sample-page/?log=YWRtaW4K&amp;secret=YWRtaW4hQCMxMjM=</a></strong></p>
  </blockquote>
  
  <p>I wanted to remove query string from the URL and output URL shows below</p>
  
  <blockquote>
    <p><a href="http://localhost/new_test/sample-page/" rel="nofollow noreferrer">http://localhost/new_test/sample-page/</a>  </p>
  </blockquote>
  
  <p>Here is my code......</p>
  
  <pre><code>$creds = array();
  
         // Decode username using base64_decode() method 
         $creds['user_login'] = base64_decode($_GET['log']);
  
         // Decode password using base64_decode() method 
         $creds['user_password'] = base64_decode($_GET['secret']);
  
         $creds['remember'] = true;
  
         $user = wp_signon( $creds, true );
         if ( ! is_wp_error($user) ) {
              wp_set_current_user($user-&gt;ID, base64_decode($_POST['log']));
              wp_set_auth_cookie($user-&gt;ID, true); 
              $redirect_to = strtok($_SERVER["REQUEST_URI"] , '?');
              wp_safe_redirect($redirect_to);
         }
  </code></pre>
  
  <p>I hope you will understand my question.</p>