Previous Next

Thread: How to configure ISS 6 to allow redirection to url without extension due to url rewritting

Last post 07-03-2008 9:52 AM by richardhbc. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 07-02-2008, 12:53 PM

    • amazigh
    • Not Ranked
    • Joined on 07-02-2008, 4:45 PM
    • Posts 1

    How to configure ISS 6 to allow redirection to url without extension due to url rewritting

    Hi,

     I describe the kind of work I am currently doing :

    I am writing an asp.net module implementing IHttpModule interface to redirect urls
    exemple : to reach url http://MonSite/voiture/Ferrari360modena.aspx
    url entered by the end user is  http://MonSite/Ferrari/360modena.aspx

    What I want to achieve is to reach the same application by using this url instead http://MonSite/Ferrari/360modena 

    I have tried this option : IIS returns an erreur
    HTTP Error 404 - File or directory not found.
    Internet Information Services (IIS)


    So I have tried to configure IIS 6.0 by attenting to map (.*) extension to aspnet_isapi.dll. but unfortunately IIS doesnt tolerate this extension. Do you know a way around to sort it out ? 
    Thanks.
    Arioule

     

  • 07-03-2008, 8:50 AM In reply to

    Re: How to configure ISS 6 to allow redirection to url without extension due to url rewritting

    By far the easiest way to do this is to use a Linux/Apache server where file extensions aren't used to determine file handling.

    The other option is use a Wildcard mapping to the ASP.NET DLL.  You will need to stay away from files which do not get processed by the DLL, since they'll get process incorrectly.

    Jeff

    Look for Wrox's new book Professional IIS 7 in your local bookstore, or order now at Amazon.com
  • 07-03-2008, 9:52 AM In reply to

    Re: How to configure ISS 6 to allow redirection to url without extension due to url rewritting

    Assuming you've got access to the IIS Manager for that website, create a virtual directory called "360modena" within the ferrari folder. Then configure the virtual folder to be a redirection to a url and specify the url as /voiture/ferrari/360modena.aspx.

    If you don't have access to the IIS Manager, you can create a folder called "360modena" below the ferrari folder. Then, in that folder, create a default.asp page that just calls Response.Redirect("/voiture/ferrari/360modena.aspx").

    Richard.
Page 1 of 1 (3 items)
Page view counter