Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 3.0 support forum
 Helicon Tech : ISAPI_Rewrite 3.0 support forum
Subject Topic: v3 upgrade now double script execution Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
red5
Newbie
Newbie


Joined: 09 September 2008
Location: Australia
Online Status: Offline
Posts: 10
Posted: 09 September 2008 at 8:11pm | IP Logged Quote red5

We run v2 on windows 2003 server, and I have installed v3 on to our local development windows 2008 server.

I used the tool to upgrade my rules from v2 to v3 (serial number removed):

# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.48

# Registration info
RegistrationName= Red5 xxxxxxxxxxxx
RegistrationCode= xxxxx-xxxxx-xxxxx-xxxxx
RewriteEngine On
RewriteCompatibility2 On
RepeatLimit 32
RewriteBase
#  Url Rewriting Config V4 (for ISAPI_Rewrite)
#  used in CMS Base projects
RewriteRule ^/([a-zA-Z0-9\-/]+)(\?(.*))?$ /index.cfm?DocPath=$1&$3 [L]

On the 2003 servers the rewrite works beautifully see www.brightonrsl.com.au for an example.

However in development on our 2008 server, every request is fired twice. We noticed because when doing inserts with SQL we ended up with 2 new rows, not one. I installed logging and cut the application right back to 2 files and 2 lines of code in each to enable simple root logging.

running a URL like http://domain.local/ results in only one execution, but as soon as I get to http://domain.local/some-url/ the files are executed twice.

I should add that my local development environment that runs Vista and Apache 2.2 using the same rewriterule runs fine.

Any help greatly appreciated!


Edited by red5 - 09 September 2008 at 8:36pm
Back to Top View red5's Profile Search for other posts by red5 Visit red5's Homepage
 
Vyacheslav
Moderator Group
Moderator Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 673
Posted: 10 September 2008 at 4:08am | IP Logged Quote Vyacheslav

Hi Duncan.
Please provide your rewrite.log file.

__________________
Kind regards!
Vyacheslav Shinkarenko, HeliconTech.
Back to Top View Vyacheslav's Profile Search for other posts by Vyacheslav Visit Vyacheslav's Homepage
 
red5
Newbie
Newbie


Joined: 09 September 2008
Location: Australia
Online Status: Offline
Posts: 10
Posted: 10 September 2008 at 6:25am | IP Logged Quote red5

Actually the C:\Program Files\Helicon\ISAPI_Rewrite3rewrite.log is empty.

Would there be another location to check?

The error.log has this in it:

[10/09/2008 20:58:46] ISAPI Filter loaded. Version 3.1.0.48. Windows 6.0 (Build 6001 ServicePack:1) ProductType SERVER. CPU type INTEL  NumberOfProcessors 4.


Back to Top View red5's Profile Search for other posts by red5 Visit red5's Homepage
 
red5
Newbie
Newbie


Joined: 09 September 2008
Location: Australia
Online Status: Offline
Posts: 10
Posted: 10 September 2008 at 6:28am | IP Logged Quote red5

I put some logging in with ColdFusion and here is the result, from one template, with the clock tick count at the end:

"Information","jrpp-22","09/10/08","21:02:14","RED5CUSTOMERSUPPORT","running test page 1221044534880"
"Information","jrpp-22","09/10/08","21:02:14","RED5CUSTOMERSUPPORT","running test page 1221044534925"

The result is that the browser recieves data from the second process.

If I run the same template directly domain.local/test.cfm then I only get one entry in the log file.
Back to Top View red5's Profile Search for other posts by red5 Visit red5's Homepage
 
Vyacheslav
Moderator Group
Moderator Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 673
Posted: 10 September 2008 at 6:59am | IP Logged Quote Vyacheslav

Duncan, please make sure that your httpd.conf contains this directive: RewriteLogLevel 9

__________________
Kind regards!
Vyacheslav Shinkarenko, HeliconTech.
Back to Top View Vyacheslav's Profile Search for other posts by Vyacheslav Visit Vyacheslav's Homepage
 
red5
Newbie
Newbie


Joined: 09 September 2008
Location: Australia
Online Status: Offline
Posts: 10
Posted: 10 September 2008 at 7:26pm | IP Logged Quote red5

Here it is:

xx.xx.0.65 xx.xx.0.65  Thu, 11-Sep-2008  10:00:27 GMT [my.red5.local/sid#12][rid#25246016/initial] (2) init rewrite engine with requested uri /test/
xx.xx.0.65 xx.xx.0.65  Thu, 11-Sep-2008  10:00:27 GMT [my.red5.local/sid#12][rid#25246016/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf
xx.xx.0.65 xx.xx.0.65  Thu, 11-Sep-2008  10:00:27 GMT [my.red5.local/sid#12][rid#25246016/initial] (3) applying pattern '^/([a-zA-Z0-9\-/]+)(\?(.*))?$' to uri '/test/'
xx.xx.0.65 xx.xx.0.65  Thu, 11-Sep-2008  10:00:27 GMT [my.red5.local/sid#12][rid#25246016/initial] (1) escaping /index.cfm?DocPath=test/&
xx.xx.0.65 xx.xx.0.65  Thu, 11-Sep-2008  10:00:27 GMT [my.red5.local/sid#12][rid#25246016/initial] (1) Rewrite URL to >> /index.cfm?DocPath=test/&
xx.xx.0.65 xx.xx.0.65  Thu, 11-Sep-2008  10:00:27 GMT [my.red5.local/sid#12][rid#25246016/initial] (2) rewrite '/test/' -> '/index.cfm?DocPath=test/&'
xx.xx.0.65 xx.xx.0.65  Thu, 11-Sep-2008  10:00:27 GMT [my.red5.local/sid#12][rid#25246016/initial] (2) internal redirect with /index.cfm?DocPath=test/& [INTERNAL REDIRECT]

CF logging:
"Information","jrpp-3","09/11/08","10:00:27","RED5CUSTOMERSUPPORT","running test page 1221091227589"
"Information","jrpp-3","09/11/08","10:00:27","RED5CUSTOMERSUPPORT","running test page 1221091227621"


Back to Top View red5's Profile Search for other posts by red5 Visit red5's Homepage
 
red5
Newbie
Newbie


Joined: 09 September 2008
Location: Australia
Online Status: Offline
Posts: 10
Posted: 10 September 2008 at 7:30pm | IP Logged Quote red5

If I run the rewritten URL (which is corect BTW)

http://my.red5.local/index.cfm?DocPath=test/&

10.28.0.65 10.28.0.65  Thu, 11-Sep-2008  10:04:21 GMT [my.red5.local/sid#12][rid#25246016/initial] (2) init rewrite engine with requested uri /index.cfm
10.28.0.65 10.28.0.65  Thu, 11-Sep-2008  10:04:21 GMT [my.red5.local/sid#12][rid#25246016/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf
10.28.0.65 10.28.0.65  Thu, 11-Sep-2008  10:04:21 GMT [my.red5.local/sid#12][rid#25246016/initial] (3) applying pattern '^/([a-zA-Z0-9\-/]+)(\?(.*))?$' to uri '/index.cfm?DocPath=test/&'

and only one line in the CF log:
"Information","jrpp-3","09/11/08","10:04:21","RED5CUSTOMERSUPPORT","running test page 1221091461872"

I hope this info helps, I cant see where the issue could be.
Back to Top View red5's Profile Search for other posts by red5 Visit red5's Homepage
 
Vyacheslav
Moderator Group
Moderator Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 673
Posted: 11 September 2008 at 6:02am | IP Logged Quote Vyacheslav

Hi Duncan.
Please remove this line:
Code:
RewriteCompatibility2 On

And try this solution:
Code:
RewriteBase /
RewriteRule ^([\w/]+)$ index.cfm?DocPath=$1 [NC,L,QSA]


__________________
Kind regards!
Vyacheslav Shinkarenko, HeliconTech.
Back to Top View Vyacheslav's Profile Search for other posts by Vyacheslav Visit Vyacheslav's Homepage
 
red5
Newbie
Newbie


Joined: 09 September 2008
Location: Australia
Online Status: Offline
Posts: 10
Posted: 14 September 2008 at 8:36pm | IP Logged Quote red5

Vyacheslav,

Thanks for your continued support in this matter.

I replaced my rewrite with the code you suggest and now have the following:

Code:

RewriteEngine On
RewriteLogLevel 9
# RewriteCompatibility2 On
RepeatLimit 32
# RewriteBase
# RewriteRule ^/([a-zA-Z0-9\-/]+)(\?(.*))?$ /index.cfm?DocPath=$1&$3 [L]
RewriteBase /
RewriteRule ^([\w/]+)$ index.cfm?DocPath=$1 [NC,L,QSA]


However I am still getting double executions.

Here is the rewrite log:
10.28.0.65 10.28.0.65  Mon, 15-Sep-2008  11:11:31 GMT [my.red5.local/sid#12][rid#25256440/initial] (2) init rewrite engine with requested uri /test
10.28.0.65 10.28.0.65  Mon, 15-Sep-2008  11:11:31 GMT [my.red5.local/sid#12][rid#25256440/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf
10.28.0.65 10.28.0.65  Mon, 15-Sep-2008  11:11:31 GMT [my.red5.local/sid#12][rid#25256440/initial] (3) applying pattern '^([\w/]+)$' to uri 'test'
10.28.0.65 10.28.0.65  Mon, 15-Sep-2008  11:11:31 GMT [my.red5.local/sid#12][rid#25256440/initial] (1) escaping /index.cfm?DocPath=test
10.28.0.65 10.28.0.65  Mon, 15-Sep-2008  11:11:31 GMT [my.red5.local/sid#12][rid#25256440/initial] (1) Rewrite URL to >> /index.cfm?DocPath=test
10.28.0.65 10.28.0.65  Mon, 15-Sep-2008  11:11:31 GMT [my.red5.local/sid#12][rid#25256440/initial] (2) rewrite 'test' -> '/index.cfm?DocPath=test'
10.28.0.65 10.28.0.65  Mon, 15-Sep-2008  11:11:31 GMT [my.red5.local/sid#12][rid#25256440/initial] (2) internal redirect with /index.cfm?DocPath=test [INTERNAL REDIRECT]

Back to Top View red5's Profile Search for other posts by red5 Visit red5's Homepage
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Online
Posts: 4839
Posted: 16 September 2008 at 5:41am | IP Logged Quote Anton

Can you please provide IIS log records for your test request.
And also make sure you don't have ISAPI_Rewrite filter installed twice: on server and site level.

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
red5
Newbie
Newbie


Joined: 09 September 2008
Location: Australia
Online Status: Offline
Posts: 10
Posted: 16 September 2008 at 6:15am | IP Logged Quote red5

Current httpd.conf:

RewriteEngine On
RewriteLogLevel 9
# RewriteCompatibility2 On
RepeatLimit 32

RewriteBase /
RewriteRule ^([\w/]+)$ index.cfm?DocPath=$1 [NC,L,QSA]


IIS Log:

2008-09-16 10:41:53 10.28.0.6 GET /index.cfm DocPath=login/ 80 - 10.28.0.252 Mozilla/5.0+(Windows;+U;+Windows+NT+6.0;+en-GB;+rv:1.9.0.1)+Gecko/2008070208+Firefox/3.0.1 200 0 0 62
2008-09-16 10:41:53 10.28.0.6 GET /CFIDE/scripts/cfform.js - 80 - 10.28.0.252 Mozilla/5.0+(Windows;+U;+Windows+NT+6.0;+en-GB;+rv:1.9.0.1)+Gecko/2008070208+Firefox/3.0.1 200 0 0 109
2008-09-16 10:41:53 10.28.0.6 GET /CFIDE/scripts/masks.js - 80 - 10.28.0.252 Mozilla/5.0+(Windows;+U;+Windows+NT+6.0;+en-GB;+rv:1.9.0.1)+Gecko/2008070208+Firefox/3.0.1 200 0 0 46
2008-09-16 10:41:53 10.28.0.6 GET /css/cms_styles.css - 80 - 10.28.0.252 Mozilla/5.0+(Windows;+U;+Windows+NT+6.0;+en-GB;+rv:1.9.0.1)+Gecko/2008070208+Firefox/3.0.1 200 0 0 46
2008-09-16 10:41:53 10.28.0.6 GET /media/pics/cms/loginbg.gif - 80 - 10.28.0.252 Mozilla/5.0+(Windows;+U;+Windows+NT+6.0;+en-GB;+rv:1.9.0.1)+Gecko/2008070208+Firefox/3.0.1 200 0 0 46
2008-09-16 10:41:53 10.28.0.6 GET /media/pics/cms/loginpagebg.gif - 80 - 10.28.0.252 Mozilla/5.0+(Windows;+U;+Windows+NT+6.0;+en-GB;+rv:1.9.0.1)+Gecko/2008070208+Firefox/3.0.1 200 0 0 234
2008-09-16 10:41:53 10.28.0.6 GET /media/pics/cms/login.gif - 80 - 10.28.0.252 Mozilla/5.0+(Windows;+U;+Windows+NT+6.0;+en-GB;+rv:1.9.0.1)+Gecko/2008070208+Firefox/3.0.1 200 0 0 234
2008-09-16 10:41:53 10.28.0.6 GET /media/pics/cms/logo78.gif - 80 - 10.28.0.252 Mozilla/5.0+(Windows;+U;+Windows+NT+6.0;+en-GB;+rv:1.9.0.1)+Gecko/2008070208+Firefox/3.0.1 200 0 0 234
2008-09-16 10:41:58 10.28.0.6 POST /index.cfm DocPath=login/Process/ 80 - 10.28.0.252 Mozilla/5.0+(Windows;+U;+Windows+NT+6.0;+en-GB;+rv:1.9.0.1)+Gecko/2008070208+Firefox/3.0.1 302 0 0 62
2008-09-16 10:41:58 10.28.0.6 GET /media/pics/cms/mainlogo.gif - 80 - 10.28.0.252 Mozilla/5.0+(Windows;+U;+Windows+NT+6.0;+en-GB;+rv:1.9.0.1)+Gecko/2008070208+Firefox/3.0.1 200 0 0 62
2008-09-16 10:41:58 10.28.0.6 GET /index.cfm DocPath=tickets/ 80 - 10.28.0.252 Mozilla/5.0+(Windows;+U;+Windows+NT+6.0;+en-GB;+rv:1.9.0.1)+Gecko/2008070208+Firefox/3.0.1 200 0 0 733
2008-09-16 10:42:02 10.28.0.6 GET /index.cfm DocPath=test/ 80 - 10.28.0.252 Mozilla/5.0+(Windows;+U;+Windows+NT+6.0;+en-GB;+rv:1.9.0.1)+Gecko/2008070208+Firefox/3.0.1 200 0 0 124

Logging from ColdFusion:

"Information","jrpp-14","09/16/08","20:42:02","RED5CUSTOMERSUPPORT","running test page 1221561722497"
"Information","jrpp-14","09/16/08","20:42:02","RED5CUSTOMERSUPPORT","running test page 1221561722528"

Even though I have log level 9 - I dont seem to have a rewrite.log. I have restarted IIS and all sorts, but no luck.

In IIS7 looking at the server level the ISAPI filter is installed. When a new site is created the ISAPI filter is installed to the site. I have tried running a site without the filter in the site ISAPI filter screen, but get nothing but a 404 error. 
Back to Top View red5's Profile Search for other posts by red5 Visit red5's Homepage
 
Vyacheslav
Moderator Group
Moderator Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 673
Posted: 16 September 2008 at 9:41am | IP Logged Quote Vyacheslav

ISAPI_Rewrite must be installed only in one level: server or site.

__________________
Kind regards!
Vyacheslav Shinkarenko, HeliconTech.
Back to Top View Vyacheslav's Profile Search for other posts by Vyacheslav Visit Vyacheslav's Homepage
 
red5
Newbie
Newbie


Joined: 09 September 2008
Location: Australia
Online Status: Offline
Posts: 10
Posted: 17 September 2008 at 3:21am | IP Logged Quote red5

ok so I removed the isapi filter from the server and manually added it to the website. Unfortunately I have the same issue, I still get double writes in my log file via CF.

Here is my config.
Code:

RewriteEngine On
RewriteLogLevel 9
RewriteCompatibility2 On
RepeatLimit 32

RewriteBase
#RewriteRule ^([\w/]+)$ index.cfm?DocPath=$1 [NC,L,QSA]
RewriteRule ^/([a-zA-Z0-9\-/]+)(\?(.*))?$ /index.cfm?DocPath=$1&$3 [L]

As I have no asp skills I am going to install php and try to rule out any issues with coldFusion. In the meantime any help is appreciated. Unless you can give me a short and simple write to file asp / .NET script I can try.
Back to Top View red5's Profile Search for other posts by red5 Visit red5's Homepage
 
Vyacheslav
Moderator Group
Moderator Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 673
Posted: 17 September 2008 at 4:19am | IP Logged Quote Vyacheslav

Hi.
Actually there aren't double rewriting in your rewrite.log. Why you thought about it?

Also please try these rules:
Code:
RewriteRule ^(/(?!index.cfm)[\w/]+)$ /index.cfm?DocPath=$1 [NC,L,QSA]


__________________
Kind regards!
Vyacheslav Shinkarenko, HeliconTech.
Back to Top View Vyacheslav's Profile Search for other posts by Vyacheslav Visit Vyacheslav's Homepage
 
red5
Newbie
Newbie


Joined: 09 September 2008
Location: Australia
Online Status: Offline
Posts: 10
Posted: 17 September 2008 at 6:32am | IP Logged Quote red5

Vyacheslav wrote:
Actually there aren't double rewriting in your rewrite.log. Why you thought about it?


Correct there is no indication of double rewrite in the rewrite.log, but at the lowest level I am writing to a file from ColdFusion.  This logging is indicating that for every request made via the browser, ColdFusion is running rewritten requests twice.
Back to Top View red5's Profile Search for other posts by red5 Visit red5's Homepage
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Online
Posts: 4839
Posted: 18 September 2008 at 5:26am | IP Logged Quote Anton

Please make sure this situation is caused by ISAPI_Rewrite. Turn ISAPI_Rewrite off and try to reproduce the issue.
Maybe you still have ISAPI_Rewrite2 dll installed.
Please also try to upgrade to the latest and most stable build 56.

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
red5
Newbie
Newbie


Joined: 09 September 2008
Location: Australia
Online Status: Offline
Posts: 10
Posted: 30 September 2008 at 2:51am | IP Logged Quote red5

Anton wrote:
Please make sure this situation is caused by ISAPI_Rewrite. Turn ISAPI_Rewrite off and try to reproduce the issue.
Maybe you still have ISAPI_Rewrite2 dll installed.
Please also try to upgrade to the latest and most stable build 56.


Anton

I have reinstalled the ISAPI rewrite with version 56. I have removed the entry under the server, and installed it only under the website.

Pages that do not get passed through isapirewrite do not have double execution. e.g. http://domain.local/test/ = http://domain.local/templates/template_test.cfm

http://domain.local/test/ = duplicate log entry, therefore duplicate execution

http://domain.local/templates/template_test.cfm = only one log entry.

My rewrite.conf looks like this:

RewriteEngine On
RewriteLogLevel 9
RewriteCompatibility2 On
RepeatLimit 32

RewriteBase
#RewriteRule ^([\w/]+)$ index.cfm?DocPath=$1 [NC,L,QSA]
RewriteRule ^/([a-zA-Z0-9\-/]+)(\?(.*))?$ /index.cfm?DocPath=$1&$3 [L]

If it helps please PM me and we can arrange a RDP session for you to look at the server.
Back to Top View red5's Profile Search for other posts by red5 Visit red5's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

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 can vote in polls in this forum