Written by
Marco Lusini
For umbraco versions:
umbraco3.0Quick Tip
Use the url rewriting feature included in umbraco 3.0 to hide debugging info.
As you may know, umbraco has a feature that allows you to see what is going on behind the scene in order to debug your templates: you can get the complete stack trace for a page by appending "?umbDebugShowTrace=true" to the page's url and you can get the list of elements (macro and fields ) that make up a page by appending "?umbDebug=true" to the page's url.
This feature cannot be turned off but, for production systems, you can easily block it by using the url rewriting feature included in umbraco 3.0:
just add
<add name="nodebug"
virtualUrl="(.*).aspx.*umbDebug.*"
rewriteUrlParameter="IncludeQueryStringForRewrite"
redirect="Application"
destinationUrl="~$1.aspx"
ignoreCase="true" />
in the <rewrites> section of your /config/UrlRewriting.config file and touch web.config to restart the web application.