ISAPI rewriterule stopping client side script

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 3
Joined: 09 May 2013, 08:28

ISAPI rewriterule stopping client side script

09 May 2013, 08:38

Hi,

We've just put some rules into our .htaccess file to take advantage of some rewritemap's. The problem we are getting is that on certain pages any client-side JS is not running. An example is that we use a Dropdown list with an Ajaxtoolkit CascadingDropDown. When we include the rule the servicepath got the cascading dropdown isn't called at all, but if we take it away it works (this was checked with fiddler). We are using C# .net 4 on a web application. I've also had a similar problem where a CollapsiblePanelExtender just stops working when a map rule is used.

in our .htaccess file we have:

Code: Select all
RewriteMap blogmap txt:./RewriteMaps/Blog.txt [NC]
RewriteRule ^/blog/(.*) ${blogmap:$1} [NC,L]


Inside the blog.txt we have:

Code: Select all
blog-and_that_was_the_week.html /blog/week_3_8_2012/
blog-and_that_was_the_week_1.html /blog/week_10_8_2012/
blog-and_that_was_the_week_12th_oct.html /blog/week_12_10_2012/
blog-and_that_was_the_week_14_sep.html /blog/week_14_9_2012/
blog-and_that_was_the_week_16_nov.html /blog/week_16_11_2012/
blog-and_that_was_the_week_17_augus.html /blog/week_17_8_2012/
blog-and_that_was_the_week_17_sep.html /blog/week_21_9_2012/
blog-and_that_was_the_week_2_nov.html /blog/week/2/1/2012/
blog-and_that_was_the_week_23_nov.html /blog/week_23_11_2012/
blog-and_that_was_the_week_24_aug.html /blog/week_24_8_2012/
blog-and_that_was_the_week_26_oct.html /blog/week_26_10_2012/
blog-and_that_was_the_week_28_sep.html /blog/week_28_9_2012/
blog-and_that_was_the_week_29_oct.html /blog/week_19_10_2012/
blog-and_that_was_the_week_5_oct.html /blog/week_5_10_2012/
blog-and_that_was_the_week_7_sep.html /blog/week_7_9_2012/
blog-and_that_was_the_week_9_nov.html /blog/week_9_11_2012/


I've already tried leaving the rule in and emptying the blog.txt, but I get the same problem.

I've also checked the Isapi rewrite and error logs and can't see anything unusual.

Can anyone think of a reason why a rewriter rule would stop a c# .net page working like this?

I'd be grateful for any leads, ideas and help!

Many thanks,

Phil

User avatar
Posts: 871
Joined: 12 Mar 2012, 09:54

Re: ISAPI rewriterule stopping client side script

14 May 2013, 07:49

Hello, Phil

Please try to fix your rules as follows:

RewriteMap blogmap txt:./RewriteMaps/Blog.txt [NC]
RewriteCond ${blogmap:$1|NOT_FOUND} !NOT_FOUND
RewriteRule ^/blog/(.*) ${blogmap:$1} [NC,L]

User avatar
Posts: 3
Joined: 09 May 2013, 08:28

Re: ISAPI rewriterule stopping client side script

14 May 2013, 08:05

Thank you very much, that seems to have worked :)

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 19 guests