URL Mappings
- Open web.config file. (see MSDN)
- Create new urlMappings section within the system.web section.
- <urlMappings enabled="true">
<add url="~/contactus.aspx" mappedUrl="~/index.aspx" />
</urlMappings>
- If user types contactus.aspx, page mapped to the index.aspx.
- This approach won't work if you have 100 of pages to map.
- Best solution is to use regular expressions, but ASP.NET does not support. SEE
URL Rewriting