Welcome Guest! To enable all features please Login or Register.
Options
View
Go to last post Go to first unread
Online vcsharp  
#1 Posted : Tuesday, October 31, 2017 10:20:52 AM(UTC)
vcsharp


Rank: YAF Lover

Reputation:

Joined: 10/3/2017(UTC)
Posts: 37
Man
Anguilla

Thanks: 9 times
I am using RadEditor in YAF. The edtior renders properly and works except when editor tries to open a dialog like image properties dialog. The URLRewriter causes the url requested for the image dialog to be redirected to the default page of YAF.

All urls for RadEditor dialog will have the following string in them: Telerik.Web.UI.DialogHandler.aspx, but url will not end with this string.

What can I do to make sure that dialog requests from RadEditor are not intercepted by URLRewriter module?

Edited by user Tuesday, October 31, 2017 10:23:19 AM(UTC)  | Reason: Not specified

Sponsor
Online vcsharp  
#2 Posted : Thursday, November 2, 2017 1:25:29 AM(UTC)
vcsharp


Rank: YAF Lover

Reputation:

Joined: 10/3/2017(UTC)
Posts: 37
Man
Anguilla

Thanks: 9 times
I found out how to exclude a URL containing a specific string from URL rewriting. You have to include the specific string in the last rule in UrlRewriter.config file. This rule is as below. One needs to go to the if part of this rule and include the specific string in the list. For example, if you want to exclude a URL that contains Telerik then just add |Telerik to the end of the if list i.e. just after |ckfinder in the if list.

In my case, I added the specific string |Telerik\.Web\.UI\.DialogHandler just after |ckfinder.

What this rule is saying that if the URL does NOT contain any of the strings that are separated by | (pipe) character, then do URL rewriting processing according to what's within the if rule, else go to next rule; but, since this is the last rule and there is no next rule, so effectively no URL rewrite occurs.

Code:
   <if url="^((?!\.ashx|\.asmx|\.axd|\.gif|\.png|\.jpg|\.ico|\.pdf|\.css|\.js|install|error|auth\.aspx|default\.aspx|popup\.aspx|advanced\.aspx|digest\.aspx|ftb.imagegallery\.aspx|ckfinder|Telerik\.Web\.UI\.DialogHandler).)*$">
    <rewrite url="^~/(.+)?\?(.+)?$" to="~/Default.aspx?g=$1&amp;$2" processing="stop" />
    <rewrite url="^~/(.+)?\.aspx$" to="~/Default.aspx?g=$1" processing="stop" /> 
    <rewrite url="^~/(.+)?$" to="~/Default.aspx?g=$1" processing="stop" />
  </if>
Online vcsharp  
#3 Posted : Thursday, November 2, 2017 5:12:15 AM(UTC)
vcsharp


Rank: YAF Lover

Reputation:

Joined: 10/3/2017(UTC)
Posts: 37
Man
Anguilla

Thanks: 9 times
My last reply to this question will solve the issue, but I found another way of making sure that URL rewriter does not rewrite a URL containing Telerik.Web.Ui.DialogHandler.aspx. Just put the following rule at the top of other rules in URLRewriter.config file.

When you mention the following for the to attribute: to="$1", then the URL rewriter effectively does not rewrite the original URL.

Code:
  <rewrite url="^(/.*(Telerik\.Web\.UI\.DialogHandler\.aspx)(\?.*)?)$" to="$1" processing="stop" />


Rss Feed  Atom Feed
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error