https url rewriting RRS feed

  • Question

  • User-93558027 posted

    I am just wondering is it possible to rewrite an https url so I can loose the .aspx part of the url off the url show in the browser I have it working fine on an http site and the only thing I have different on another site is its https

    Thursday, October 18, 2012 11:51 AM

All replies

  • User632635755 posted

    Is your url rewriter handler (or whatever you are using for rewriting the url) configured for the HTTPS protocol or only the HTTP protocol?

    Thursday, October 18, 2012 2:12 PM
  • User-93558027 posted

    I have put the Intelligencia.UrlRewriter.dll into my bin folder and added these lines into my web.config is there anything else I need to add for https I tried adding <add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpsModule, Intelligencia.UrlRewriter" /> to the httpModules section but got an error saying it couldn't find the module

    <section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />
    			<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter" />
    			<remove name="ScriptModule"/>
    			<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule"/>

    Friday, October 19, 2012 4:20 AM
  • User-236004499 posted


    Rather using 3rd party library which you don't have control. You can easily write your own by using URL Routing method.
    (1) Create route handler class to read request using HttpHandler

    (2) Create a method to register above class (1) and add url structures to the routing table to the route (Global.ascx)

    (3) Call above method on appStart event (Global.ascx)

    (4) In your website add friendly urls. When user click on this friendly urls, request read by (1) class and execute original page in the background.

    here is the link http://weblogs.asp.net/jalpeshpvadgama/archive/2011/12/11/easy-url-rewriting-in-asp-net-4-0-web-forms.aspx

    If you want source code then let me know will drop you here.



    Wednesday, November 21, 2012 7:47 PM