There are two 'problems' to solve:
1) Removement of .aspx:
A good solution to make umbraco work without the .aspx extensions on each page is using the free IIS isapi filter
Helicon Isapi Rewrite Lite. (the lite version is freeware)
On every request IIS will automatically add the .aspx extension, so for .NET there is nothing to configure. It works with a small and simple config file based on regular expressions
Example: the following URL
http://www.landal.co.uk/gb-en/holiday-park/mapswill be transformed by IIS to
http://www.landal.co.uk/gb-en/holiday-park/maps.aspxso .NET will pick this up
The config file of isapi rewrite lite looks like this:
Code:[ISAPI_Rewrite]
#exclude the /umbraco folder from this filter
RewriteRule ^/(umbraco.*)$ /$1 [L]
#include everything else from the website
#everything without extension will have .aspx
RewriteRule ^/([^\.\?]+)/?(\?.*)?$ /$1.aspx$2 [L]
I also use this for other CMSses (sitecore and my company own CMS in the example url). They all run on Win2003, I understood a while ago that for IIS7 isapi rewrite is not needed, but I'm not 100% sure about that.
Anyway: it works great in combination with the standard friendly urls of umbraco.
2) removement of querystring variables.
For this you can use the /config/urlrewriting.config to store specific mappings from unfriendly urls to friendly urls. Here you can add your rules
One example I currently use for umbraco is the following:
Code:<add name="productoverview"
virtualUrl="~/(.*)/products/(.*)/(.*)"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="~/$1/products.aspx?type=overview&productrange=$2&theme=$3"
ignoreCase="true" />
This hides a technical URL (destination URL) with some parameters like type, productrange, theme behind a nice url /en/products/productrange-name/theme-name
that case you do not need parameters on the querystring, but you have still the possibility to request them from the querystring by using Request.QueryString["type"] etc...
in umbraco you only need to configure a document that has the name "products"
In the above example the first parameter is supposed to contain the language
/en/products
/nl/products
Regards,
Nico Lubbers