I'm working on a company website that allows users to have their own homepage under the same domain. The URL would look similar to http://mydomain.com/UserName We have each user's content saved in a database which gets displayed on a page be located in http://mydomain.com/users/default.aspx (it grabs the user's content by looking up the URL in the database)
I want the URL to stay the same in the address bar so it looks like each user has their own folder.
I've tried using Server.Transfer but my session variables end up being nothing. RewritePath works but the URL in the address bar changes. I can't do the code in a 404 page because the address bar will show 404.aspx?aspxerrorpath={requestedURL}
My main goal is to redirect and not to lose what's in the address bar. I'm using ASP.NET (if aspx extension didn't give it away LOL)
You could use Routing or Rewriting to map the user url to your asp script. This way different url's can go the the same aspx script.
Rewriting http://www.helicontech.com/isapi_rewrite/doc/RewriteRule.htm