Q:

How to Change the Destination of username Links?

In a SharePoint portal, whenever you see a username anywhere, it is automatically hyperlinked.  If you have mysites configured, it leads the user profile on mysites.  If you don't have mysites configured, it opens a profile-viewer in the page.
Now, I have a site-page called "users" with web-part that loads information from Active Directory.  I would like to change this page to become the destination for all username links.
How can I do that?

A:

It could be accomplished with HTTP Redirect in IIS.
IIS comes with IIS URL Rewrite module that allows to create various rule actions including redirect and request abort. 
Using this module it is possible to create such a rule that redirects requests from User Information Page (Userdisp.aspx vs person.aspx) to custom User Info page (/SitePages/UserInfo.aspx) 

Configuration
Let's describe how to configure that Rule in URL Rewrite
that redirects request from:  
http://{ServerName}/_layouts/userdisp.aspx?ID=1

to:
http://{ServerName}/SitePages/UserInfo.aspx?userID=1

First of all, make sure that URL rewrite module is installed in IIS

Configured Rule is shown below

Pattern: ^(.*/)?_layouts/userdisp.aspx$
Condition(
   Input: {QUERY_STRING}
   Pattern: ID=(\d+)
)
Track capture groups across conditions: enabled
Redirect URL: /SitePages/UserInfo.aspx?userID={C:1}
After all configuration will be done, rule XML configuration in web.config should have the following view:
 <rewrite>
  <rules>
    <rule name="User Info Link" enabled="true" stopProcessing="true">
      <match url="^(.*/)?_layouts/userdisp.aspx$" />
      <action type="Redirect" url="/SitePages/UserInfo.aspx?userID={C:1}" appendQueryString="false" />
      <conditions trackAllCaptures="true">
        <add input="{QUERY_STRING}" pattern="ID=(\d+)" />
      </conditions>
    </rule>
  </rules>
</rewrite>

