Let's say that on your corporate intranet, you decided to use the childportal feature of DNN. Unfortunately, when you navigate to the child portal at www.myportal.com/child, you get a URL that says www.myportal.com/default.aspx?alias=child. This isn't the end of the world, but it looks all codey.
Boring Background Information
The reason this happens is that child portals are handled initially by IIS. When you navigate to what IIS sees as a child directory with no page associated, the URL Rewriter module never sees it. It looks straight to the file system and when it doesn't see the folder there, we are going to get a file not found error. In order to get around this, the clever folk who created the sub-portal feature, made it so that when you create a child portal, the system actually creates a physical folder in the file system with a default.aspx dropped in to send you back to the main default.aspx with the alias attached as a parameter and viola, the rewriter module picks up the request and we are back in business. Pretty clever, huh?
Easy Trick
Find the file folder that the child portal creation made (in this case the folder would be called "child"). Inside you will find a file called "default.aspx". Open the default.aspx in notepad and look for the lines of code that say (it should be near the bottom).
DomainName = ServerPath & "Default.aspx?alias=" & DomainName
Response.Redirect(DomainName,True)
Remark out the response.redirect line and replace it with a server.transfer call like so:
'Response.Redirect(DomainName,True)
Server.Transfer(DomainName,True)
Save the file and navigate to your child portal. Now the location change happens on the server instead of the client and the result is an unchanged URL. If you want to make this change permanent to this installation of DNN and have this be the default behavior for all child portals, you can edit the subhost.aspx file in the /Portals/_default/ folder and make the edit there as this is the file that the framework uses to copy into the created folder.
Have Fun!