Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# tigermain 7/18/2007 3:30 PM (edited 7/18/2007 3:35 PM)
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
# gedw99 7/20/2007 1:52 PM
Hey tigermain,

i got ajax and ws working with Cuyahoga ok.

i used custom Httphandlers and hence file extension for these.

i cant remember if i had to configure IIS to handel it.

But, i do know that with ii7, you can configure EVERYTHING in yoru web.config and IIS respect this.

Hope this helps

Ged