« Previous Next »

Thread: Websphere Application Server and Rewrite Module on IIS7

Last post 07-22-2008 6:00 AM by dgrose. 5 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (6 items)

Sort Posts:

  • 07-17-2008, 10:01 AM

    • dgrose
    • Not Ranked
    • Joined on 07-17-2008, 9:42 AM
    • Birmingham, UK
    • Posts 6

    Websphere Application Server and Rewrite Module on IIS7

     Hi,

    I'm trying to set up some rewrite rules which refer to pages within Websphere Application Server.

    For example,

    <rule name="metalprices">
     <match url="metalprices/">
     <action type="Rewrite" url="/mp/prices.jsp" />
    </rule>

    When I go to http://xxx.xxx.xxx/metalprices/ in the web browser, it reports a 404.  In the detailed information, it shows the correct Requested URL as http://xxx.xxx.xxx/mp/prices.jsp, but it is trying to go to a physical path (as defined by the default site) of c:\inetpub\wwwroot\mp\prices.jsp.

    This path does not exist, as it should be going through to Websphere Application Server, which has a plugin set up within the ISAPI filters.

    If you type http://xxx.xxx.xxx/mp/prices.jsp directly into the browser, the page does display correctly.

    Thanks in advance

    Dave

  • 07-17-2008, 11:59 AM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 6:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: Websphere Application Server and Rewrite Module on IIS7

    If websphere application server uses a SF_NOTIFY_PRE_PROC filter to see which requests it should handle - you would need to use globalRules instead of rules and make sure that the url rewriter module is configured to run before the ISAPI filter module in the globalModules list.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 07-18-2008, 5:56 AM In reply to

    • dgrose
    • Not Ranked
    • Joined on 07-17-2008, 9:42 AM
    • Birmingham, UK
    • Posts 6

    Re: Websphere Application Server and Rewrite Module on IIS7

     Hi Anil,

     Thanks for your reply.

    I'm not sure if Websphere Application Server uses SF_NOTIFY_PRE_PROC, or how to find if it does...

    I tried using the globalRules, but it still failed to find the page.

    Looking down the log file, it doesn't look as if it is trying to go through the Websphere plugin, instead looking for the physical path.  If I go to the homepage, the log shows it is going through the Websphere plugin.

    I can provide the trace log files if it helps.

    Thanks

    Dave

  • 07-18-2008, 11:50 AM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 6:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: Websphere Application Server and Rewrite Module on IIS7

    Yes, freb log from the case where the request successfully goes through the websphere plugin and the case where it does not will help - re: the global rules, did you also reorder urlrewriter/isapi-filter modules in globalModules so that the urlrewriter is invoked first?

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 07-21-2008, 5:31 AM In reply to

    • dgrose
    • Not Ranked
    • Joined on 07-17-2008, 9:42 AM
    • Birmingham, UK
    • Posts 6

    Re: Websphere Application Server and Rewrite Module on IIS7

     Hi Anil,

    Due to the size of the logs, I have sent them via email.

    Thanks

    Regards

    Dave

  • 07-22-2008, 6:00 AM In reply to

    • dgrose
    • Not Ranked
    • Joined on 07-17-2008, 9:42 AM
    • Birmingham, UK
    • Posts 6

    Re: Websphere Application Server and Rewrite Module on IIS7

    Hi Anil,

    The problem was, as you said, with the order of the url rewriter / asapi filter in the globalModules...  I moved the RewriteModule to the top and it worked.

    Thanks for all your help.

    Regards

    Dave

Page 1 of 1 (6 items)
Microsoft Communities