6
           
            
                
     
    
    Ok, lets do it:
Create a folder in your root and name it "users":
Create a .htaccess file under the "users" folder and paste this lines:
 RewriteEngine on 
RewriteCond %{REQUEST_URI} ^(^/users/)(.*)$ 
RewriteRule ^([^link].*)$ https://xoops.org/users/?link=%2 [R,QSA,L]  
Were "www.xoops.org" should be changed to fit your site
Create now a index.php file under the "users" folder and paste this lines:
 include("../mainfile.php"); 
isset($_GET['link'])? $uname = $_GET['link'] : $uname = ''; 
 
if ($uname != ''){ 
    $sql= sprintf("SELECT uid FROM %s WHERE (uname = '%s')",$xoopsDB->prefix("users"), $uname); 
    $result = $xoopsDB->queryF($sql); 
    list($uid) = $xoopsDB->fetchRow($result); 
    if ($uid > '0'){ 
        $redirect_to = XOOPS_URL.'/userinfo.php?uid='.$uid; 
    } else { 
        $redirect_to = XOOPS_URL.'/index.php'; 
    } 
     
} else { 
    $redirect_to = XOOPS_URL.'/index.php'; 
} 
 
header('location: '.$redirect_to); 
?>  
OK, it will work now!
Atention: Your unames should not have special characters, spaces, etc.