This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: problem in ajax after urlrewrite
Author
Message |
EForce
Newbie


Joined: 06 March 2012
Posts: 7
Posted: 06 March 2012 at 11:02pm

hello
   i have used url rewrite in my project. i have created url rewrite
for the following link 'http://insidei.com/UAdmin/Login.aspx' as
'http://insidei.com/myaccount'. rewrite works fine.. but all the ajax codes
in my project stopped working.
i cannot understand the problem. please help me to resolve this.

thanks
Back to Top
 
HeliconA
Admin Group


Joined: 02 March 2012
Posts: 4142
Posted: 07 March 2012 at 6:33am

Hello,

Please, provide your rule and rewrite.log for the testing request.
Logging issues described in FAQ

Regards
Andrew

Edited by HeliconA - 07 March 2012 at 6:33am
Back to Top
 
EForce
Newbie


Joined: 06 March 2012
Posts: 7
Posted: 08 March 2012 at 10:37pm

hello

  thanks for the reply.my rewrite rule is

RewriteEngine on
RewriteBase /
RewriteRule ^myaccount$  http://www.insidei.com/UAdmin     /Login.aspx [[NC,R=301,L]


thanks
Femin

Back to Top
 
HeliconA
Admin Group


Joined: 02 March 2012
Posts: 4142
Posted: 12 March 2012 at 6:18am

You need your rule to be more like:

Code:
RewriteEngine on
RewriteBase /
RewriteRule ^myaccount$ http://www.insidei.com/UAdmin/Login.aspx [NC,R=301,L]


And we still need rewrite.log for the testing request.

Regards
Andrew
Back to Top
 
bharatranpura
Newbie


Joined: 12 March 2012
Location: India
Posts: 1
Posted: 12 March 2012 at 10:38am

Andrew

We write the code you given.. insidei.com/myaccout works fine, we rewrite other url in map files. url rewrite works fine but our ajex coding working stop
Back to Top Visit bharatranpura's Homepage
 
EForce
Newbie


Joined: 06 March 2012
Posts: 7
Posted: 12 March 2012 at 1:08pm

hello
   Where can i find rewrite.log. How can i access this file.
The contents of our htaccess file is as follows :

RewriteEngine on
RewriteBase /

RewriteRule ^myaccount$  http://www.insidei.com/UAdmin/Login.aspx [NC,R=301,L]

RewriteMap mapfile txt:mapfile.txt [NC]
RewriteMap revmapfile txt_rev:mapfile.txt [NC]

RewriteCond %{QUERY_STRING} ^clcd=(.+)$

RewriteRule ^searchdetails\.aspx$/ ${mapfile:%1}? [NC,R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)$ searchdetails.aspx?${revmapfile:$1}[NC,L,NS]


thanks
 
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 14 March 2012 at 4:31am

Hello, Femin

First, please clarify what version of ISAPI_Rewrite you are using - 2 or 3.

Then please notice that both RewriteMap directives refer to the same mapfile.txt, I guess it shouldn't be this way.

If you are using v3 (which I'm almost sure of), please enable logging in httpd.conf by putting

RewriteLoglevel 9

and provide rewrite.log records for the non-working AJAX request.

__________________
Regards,
Anton
Back to Top
 
EForce
Newbie


Joined: 06 March 2012
Posts: 7
Posted: 30 March 2012 at 1:37am

hello
   my code i have changes as u suggested. it is given below

RewriteEngine on
RewriteBase /

RewriteRule ^myaccount$  http://www.insidei.com/UAdmin/Login.aspx [[NC,R=301,L]

RewriteMap revmapfile txt_rev:mapfile.txt [NC]

RewriteCond %{QUERY_STRING} ^clcd=(.+)$

RewriteRule ^searchdetails\.aspx$/ ${mapfile:%1}? [NC,R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)$ searchdetails.aspx?${revmapfile:$1}[NC,L,NS]

it is working. but in some browsers like IE and Mozilla ajax components are not loaded. error messages like following is shown

Message: ASP.NET Ajax client-side framework failed to load.
Line: 94
Char: 34
Code: 0
URI: http://www.insidei.com/

Message: Syntax error
Line: 2
Char: 1
Code: 0
URI: http://www.insidei.com/ScriptResource.axd?d=tdufKIaEgd9sZ9qX88zGFIKWHYmatXby_FXqSBvFvSDb-GabbqlNRSvfNdW-ElXewL1BKvjZaZ3U0NFzdnpnXktmu1_SbxYnoVzggFyHNi-rWQWC_uouogsh8kxq4f7k0p--QA2&t=705c9838


our
ISAPI_Rewrite installation folder is in the server. so how can make changes in httpd.conf file.


pls help to solve the problem.

thanks
femin
 
Back to Top
 
EForce
Newbie


Joined: 06 March 2012
Posts: 7
Posted: 02 April 2012 at 11:03pm

hello
   pls any suggestions for the above problem

thanks
femin
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 03 April 2012 at 2:59am

Hello, Femin

So, you mean that in other browsers it works fine?
Please consider using Fiddler to see the difference in responses with different browsers.

__________________
Regards,
Anton
Back to Top
 
EForce
Newbie


Joined: 06 March 2012
Posts: 7
Posted: 04 April 2012 at 7:14am

Hello
  No ajax is not working in any of the browsers. only in Internet explorer ,they displays the error messages.
Error messages i have posted in my previous mail.
is there Any ways to prevent rewrite of Scriptresource.axd and Webresource.axd. Error messages displays these two file names.
i have only included only a part of error message in the previous mail.
Full error messsage is as follows:

============================================================================
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; SRS_IT_E879077FB376585B3FAF99; .NET CLR 3.5.30428)
Timestamp: Thu, 29 Mar 2012 06:55:46 UTC


Message: Syntax error
Line: 2
Char: 1
Code: 0
URI: http://www.insidei.com/WebResource.axd?d=FbcLFdZUiNz7SYn7nm0t4a6gaZ2R6_Liu45GL4duJVAMOdsVXG1McByy2WtK_MH7sHMx-SToQeLybqfcWeeebTIa3nE1&t=634604622479085897


Message: Syntax error
Line: 2
Char: 1
Code: 0
URI: http://www.insidei.com/ScriptResource.axd?d=tdufKIaEgd9sZ9qX88zGFIKWHYmatXby_FXqSBvFvSDb-GabbqlNRSvfNdW-ElXewL1BKvjZaZ3U0NFzdnpnXktmu1_SbxYnoVzggFyHNi-rWQWC_uouogsh8kxq4f7k0p--QA2&t=705c9838


Message: ASP.NET Ajax client-side framework failed to load.
Line: 94
Char: 34
Code: 0
URI: http://www.insidei.com/


Message: Syntax error
Line: 2
Char: 1
Code: 0
URI: http://www.insidei.com/ScriptResource.axd?d=eLQet8oafl4TnCoN4KjkeofbgmZQdSJ9OKL8DL45IjMFwFN8t4gI54HnlNa63IsaPgWf6zBkQiNxoVgPbh44mBbvyMJ_36J-Ta6N9LW2Gikjsz-1ZzDYoJCjeau4iRiXw2jcNQ2&t=705c9838


Message: 'Sys' is undefined
Line: 3
Char: 347
Code: 0
URI: http://www.insidei.com/default.aspx?_TSM_HiddenField_=ctl00_TopSearchBanner1_ctl00_HiddenField&_TSM_CombinedScripts_=%3b%3bAjaxControlToolkit%2c+Version%3d3.5.51116.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen-US%3a2a06c7e2-728e-4b15-83d6-9b269fb7261e%3a475a4ef5%3a5546a2b%3ad2e10b12%3aeffe2a26%3a37e2e5c9%3a5a682656%3a12bbc599%3ab5ab7149


Message: 'Sys' is undefined
Line: 148
Char: 1
Code: 0
URI: http://www.insidei.com/


Message: 'Sys' is undefined
Line: 592
Char: 129
Code: 0
URI: http://www.insidei.com/

Please help to solve the problem.
Is there any mistake in the rewrite code written by us.

thanks
Femin
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 05 April 2012 at 2:57am

Ok, let's try to exclude these files (Scriptresource.axd and Webresource.axd) from being rewritten:

RewriteEngine on
RewriteBase /

RewriteMap revmapfile txt_rev:mapfile.txt [NC]

RewriteRule ^myaccount$ http://www.insidei.com/UAdmin/Login.aspx [[NC,R=301,L]

RewriteCond %{QUERY_STRING} ^clcd=(.+)$
RewriteRule ^searchdetails\.aspx$ ${mapfile:%1}? [NC,R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^.*(Scriptresource|Webresource)\.axd [NC]
RewriteRule ^([^/]+)$ searchdetails.aspx?${revmapfile:$1}[NC,L,NS]

__________________
Regards,
Anton
Back to Top
 
EForce
Newbie


Joined: 06 March 2012
Posts: 7
Posted: 05 April 2012 at 6:36am

hello Anton

   Thanks a lot. Ajax is working now in all the browsers.
  

    thank u very much

     Femin
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version
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