Inconsistent ColdFusion redirection

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 3
Joined: 16 Apr 2012, 22:52

Inconsistent ColdFusion redirection

16 Apr 2012, 23:07

Hi All,

I'm running ColdFusion9 standard, Windows 2003 R2 and IIS6.0 plus .NET 4.0.30319, all with "vanilla" installs. On top we're running ISAPI_rewrite Version 3.1.0.79.

I have a very basic application intended to function as a mimic of TinyURL. All pages/requests outside the /admin folder should be redirected to a specific .cfm page in the root level. Pages inside the /admin folder should be allowd to process as normal. The redirection itself seems to be working fine - too well in fact :D

Everything works properly in both my development and test environments. On my production environment redirects randomly affect SOME of the pages in the /admin folder and not others (it should be none at all by my rules). There is no rhyme or reason I can see, having checked all three systems are consistent in terms of codebase, .htaccess, permissions, etc.

Here is my .htaccess file:

# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.79

RewriteEngine On
RewriteCond %{URL} ^(?!/(admin.*)$)
RewriteRule ^([A-Za-z0-9]*)$ redirect.cfm?s=$1 [NC,L]

I turned logging on and could not see anything wrong.

Here's a sample of the log for a request:

192.168.20.250 192.168.20.250 Tue, 17-Apr-2012 11:17:58 GMT [<domain removed>/sid#7251][rid#20521488/initial] (2) init rewrite engine with requested uri /admin/dspCreate.cfm
192.168.20.250 192.168.20.250 Tue, 17-Apr-2012 11:17:58 GMT [<domain removed>/sid#7251][rid#20521488/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf
192.168.20.250 192.168.20.250 Tue, 17-Apr-2012 11:17:58 GMT [<domain removed>/sid#7251][rid#20521488/initial] (1) Htaccess process request e:\sites\go\.htaccess
192.168.20.250 192.168.20.250 Tue, 17-Apr-2012 11:17:58 GMT [<domain removed>/sid#7251][rid#20521488/initial] (3) applying pattern '^([A-Za-z0-9]*)$' to uri 'admin/dspCreate.cfm'

I've tried the advice here http://www.helicontech.com/articles/adj ... aboration/ to no avail.

Have I missed something? Has anyone else experienced this problem?

Thanks in advance for your help.

Cheers,
Millsy

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Inconsistent ColdFusion redirection

17 Apr 2012, 07:28

Hello,

You've missed the best part in the logs, where the fun starts. Please, provide some more of the very request.

In the meantime, try using the following condition instead:
Code: Select all
RewriteCond %{REQUEST_URI} !^/admin.*$ [NC]


Regards
Andrew

User avatar
Posts: 3
Joined: 16 Apr 2012, 22:52

Re: Inconsistent ColdFusion redirection

18 Apr 2012, 20:28

Thans for your help. I've worked out the issue. It was an obscure permissions issue with Windows.

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 19 guests