#
tigermain
OK peeps, heres my guide to extensionless urlrewriting.
N.B. This is good for IIS5 in XP, I havent tested in anything else but believe it should work, and is assuming site is running from root
First we need to set up IIS. To do this point the Custom Error pages to a "URL" of "/Default.aspx" for errors 404, 405 and 500. This will stop these errors from displaying so you may want to add additional handling, but if not they will simply redirect to your homepage
2ndly open the extension mappings (home directory, configuration) and make sure "Check that file exists" is ticked for extension .asmx
3rdly we need to add an additional rule to the web.config. This MUST be above the rule to bypass physical files as that matches the passed URL, (can't post web.config line)
match: .*\?(500|40[45]);.*//[^/]*/([^\?]*)\??(.*)
replace: Default.aspx?ShortDescription=$2&$3
4thly we need to tweak the UrlRewriter class slightly so it handles the Form Action appropriately for validation controls
/Web/Utils/UrlRewriter.cs (lines 42-43, 104-106)
Download file from (forum wouldnt let me post code): http://www.anthonymain.com/files/folders/core_hacks/entry197.aspx
By using this method it should get round any issues with Web Services and AJAX.Net which other methods (such as IIS wildcards) fail to handle.
I am still testing this but if anyone notices any issues please let me know here
N.B. This is good for IIS5 in XP, I havent tested in anything else but believe it should work, and is assuming site is running from root
First we need to set up IIS. To do this point the Custom Error pages to a "URL" of "/Default.aspx" for errors 404, 405 and 500. This will stop these errors from displaying so you may want to add additional handling, but if not they will simply redirect to your homepage
2ndly open the extension mappings (home directory, configuration) and make sure "Check that file exists" is ticked for extension .asmx
3rdly we need to add an additional rule to the web.config. This MUST be above the rule to bypass physical files as that matches the passed URL, (can't post web.config line)
match: .*\?(500|40[45]);.*//[^/]*/([^\?]*)\??(.*)
replace: Default.aspx?ShortDescription=$2&$3
4thly we need to tweak the UrlRewriter class slightly so it handles the Form Action appropriately for validation controls
/Web/Utils/UrlRewriter.cs (lines 42-43, 104-106)
Download file from (forum wouldnt let me post code): http://www.anthonymain.com/files/folders/core_hacks/entry197.aspx
By using this method it should get round any issues with Web Services and AJAX.Net which other methods (such as IIS wildcards) fail to handle.
I am still testing this but if anyone notices any issues please let me know here