想讓用戶點擊簡單的 guid.html,實際載入複雜的 guid_{492f3e0b-848e-11da-9550-00e08161165f}.html,且瀏覽器網址列保持簡單 URL。
<system.web>
<urlMappings enabled="true">
<add url="~/guid.html" mappedUrl="guid_{492f3e0b-848e-11da-9550-00e08161165f}.html" />
</urlMappings>
</system.web>
PostResolveRequestCache 階段攔截請求。url 屬性(支援 ~ 應用程式根目錄)。mappedUrl,**不改變瀏覽器網址列**(Server.Transfer 模式)。HttpModule + HttpContext.RewritePath 或 ASP.NET Routing (3.5 SP1+)。適合少量固定頁面的美化 URL 需求,零程式碼、零編譯、即設即用。