Rewrite url without extension RRS feed

  • Question

  • User139151574 posted
    Hi, Is there a way, if a user enters it, to rewrite the following url : http://www.myserver.com/products to: http://www.myserver.com/sales/products assuming the first url doesn't exist on the server.
    Tuesday, February 8, 2005 12:31 PM

All replies

  • User-1645088262 posted
    Yes, but you need to add a wildcard script mapping (to .NET) in IIS. Once you do that you can use a redirect component / module or do the matching & rewriting in your code. There are some demonstrations of this sort of redirect here: http://www.intesoft.net/aspRedirector/demonstration.aspx
    Tuesday, February 8, 2005 2:20 PM
  • User139151574 posted
    Thanks, i was hoping there was a way to do it without mapping everything to .net, I know it can be done if it's a file with an extension but doesn't like like it can be done for a folder or file without an extension.
    Wednesday, February 9, 2005 6:38 AM
  • User-1645088262 posted
    An alternative way is to write a custom 404 error page and tie things into that, it is a bit of a kludge though.
    Wednesday, February 9, 2005 9:03 AM