title: Efficient URL masking/cloacking/hiding in existing ASP.NET 4 solution
body: <p>I have a current system using IIS 6 and 7, written in ASP.NET with C# in .NET 4.</p>
  
  <blockquote>
    <p>My purpose is to hide the url completely (as per client request). i.e.
    <a href="https://myapp.it.mydomain.com/Secure/folder1/folder2/folder3/someView.aspx" rel="nofollow">https://myapp.it.mydomain.com/Secure/folder1/folder2/folder3/someView.aspx</a>
    must be <a href="https://myapp.it.mydomain.com/" rel="nofollow">https://myapp.it.mydomain.com/</a> or at least a unfirm non
    changing page: <a href="https://myapp.it.mydomain.com/constantView.aspx" rel="nofollow">https://myapp.it.mydomain.com/constantView.aspx</a></p>
  </blockquote>
  
  <p>Currently, we make use of <code>Response.Redirect</code> for all navigation items, and some direct links. 
  We also have some minor usage of query strings, but more dependent on cross-page post backs.
  We do not have any means of URL masking in place and are looking to provide a mechanism to do so.</p>
  
  <p>I'm already aware of a few method to perform URL Masking, but would like SO's opinion in the easiest to implement solution.</p>
  
  <p>Easiest, is referring to time to implement. 
  i.e. Changing our calls to use Server.Transfer exclusively is not an option.</p>
  
  <p><code>ASP.NET Routing</code> seems like a fair solution, but needs work on all query strings as I understand it, to map where we need them to. I am not clear if this can provide hiding for all pages instead of one to one mapping.</p>
  
  <p>Using framesets/iFrames is also not an option, as it causes many complications with the existing solution.</p>
  
  <p>As I understand it, the <code>URL Rewrite Module</code> may be my best solution.</p>
  
  <p>I'm hoping this question can lead to a good list of possibly solutions, and perhaps methods that I have not already been made aware of.</p>
  
  <hr>
  
  <p><em>edit</em></p>
  
  <p>A more clear question with current situation:</p>
  
  <p>We are using IIS 6 (thus the IIS 7 rewrite module is out of the question).
  Is there a way to provide URL cloaking/masking which will not break existing code which uses Page.Referrer (in ASP.NET) and query strings?</p>
  
  <p>The idea is to make the address bar always appear to be the same.
  Even a JavaScript hack is acceptable.</p>