Extensionless URL not working on website

Discussion in 'Windows / IIS' started by medsforpet, Dec 24, 2009.

  1. I am trying to implement extension less URLs using the UrlRewriter dll and the web.config for rewrite rules. I have all config sections in place and the rewriting works on my localhost, i.e. when I am in the debugging mode. I just cannot get it work on the production site www.medsforpet.com

    I wrote to the support staff and they refused to help saying that they don't provide coding help. I don't require coding help because there is nothing wrong with the way rewrite rules are set up on my end. It wouldn't work on my localhost in debugging mode if it was a coding issue. I am sure it is a DiscountASP.Net problem, but no one is willing to hear me out.

    Can someone please help?
     
  2. I have the same problem. And I agree that this is not the "coding problem".
    On my computer it works.
    Urls with "aspx" extensions proceeded successfully.
    But it seems that DiscountASP.Net team simply doesn't have any solution. :)
     
  3. mjp

    mjp

    That's not necessarily so. Unless your development environment is set up to replicate a shared hosting network, and in all likelihood it is not. You can find hundreds of "It works on my laptop, why doesn't it work on your servers?" threads here. That doesn't mean that your development environment is wrong or that our environment is wrong. It means that they are different.

    Support has to decline to help with certain things, and configuring URL rewriting is a good example of one of those things. It can be complicated, there are multiple ways to achieve the same result, and it's easy to break. It may not be a "coding" issue per se, but it's a configuration issue, and not one we can give you a black and white solution for. That is not really a function of our support, I'm afraid.

    There are many threads here that describe various forms of URL rewriting and how it's done.
     
  4. Exactly. There are two kinds of configuration: the first one is my site configuration and the second one is your server configuration. If you are sure that someone succeeded with extensionless url redirection, I'll continue with seeking the solution, but what if the problem is with your IIS 7 server configuration? If some flag denies such redirection? Just tell me that you know some success story.
     
  5. When I am entering some not existing URL on "live" server I receive the following screen:
    [​IMG]

    It means that there IS some additional redirection of the server! Perhaps it prevents all my attempts?
     
  6. Bruce

    Bruce DiscountASP.NET Staff

    Are you using Classic or Integrated Pipeline mode? If you want IIS to handle non-aspx files, you should use Integrated Pipeline mode OR setup a wildcard mapping.

    You mentioned that this works in your dev environment. Are you using IIS or development web server with VS.NET? Note that with development server, all requests are handled by ASP.NET. This is not the case with IIS. See http://www.asp.net/learn/hosting/tutorial-06-cs.aspx for more details.
     
  7. Thank you! The problem was with classic Pipeline Mode. Now I more understand the difference between my environment and production. Thank you for good answer.
     
  8. Wow...Good catch...Way to go guys ;-)
     

Share This Page