As Tyler recommended, I have installed ISAPI_Rewrite (lite version).  It
works on localhost and on staging, but I cannot get it to respond at all on
my live box (Win2003).  Has anyone seen this?  Could CF7 be getting the
request before the filter?  I had Spikes FU Servlet installed, but have
since removed it from the web.xml and restarted CF.

I have even tried rules that do not have anything to do w/CF (e.g. rewrite
/asdf -> /).


Scott Talsma 
CTO
echo.eleven
404.845.3458

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Tyler Ham
Sent: Tuesday, October 25, 2005 9:09 AM
To: [email protected]
Subject: [farcry-dev] Re: Friendly URLs


On 10/25/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> without Spike's java servlet - via IIS ISAPI url rewriting.
> Can somebody point my to a guide or give me a quick lowdown on what is 
> required to get FU's up and running?

Craig + anyone else who might be interested in this info,

We are running with Farcry 3.0 on our production sites with friendly urls
working *without* the servlet.  I will loosely describe our configuration
here for anyone who is interested.

We are running IIS 6, on Windows Server 2003, MySQL 4.1.8, ColdFusion MX
6.1.

We run multiple Farcry instances under a single domain.  The web addresses
vary, depending on the instance.  For example:
Instance 1:  http://domain.com/
Instance 2:  http://domain.com/instance2/ Instance 3:
http://domain.com/~instance3/ Instance 4:
http://domain.com/something/instance4/

The Admin addresses all conform to a particular format, for example:
Instance 1:  http://domain.com/farcry/instance1_admin/
Instance 2:  http://domain.com/farcry/instance2_admin/
And so on...

We have an apps.cfm file that looks for the 'instance1' or 'instance2'
(or whatever) part of the admin url and sets the stApps struct accordingly,
so the correct instance's application.cfm is loaded.  (I'm not sure if this
is still necessary, but it's how we've been running since Farcry 2.3)

The friendly url prefix for each instance is something like
'/go/instance1/'.  So all of our friendly urls start with '/go/', and then
go on to be specific to an instance.

We have set up ISAPI_Rewrite with IIS.
See http://www.isapirewrite.com.  We are using the lite version (the free
one).
We have our own authentication system (we're a department at a University,
The University manages the authentication system), and we require SSL for
this.  We used to add a couple of lines to Application.cfm files to require
SSL, but have now switched to using a rule in the ISAPI_Rewrite config file.
That rule looks something like this:
RewriteCond %HTTPS OFF
RewriteRule /go/instance2/(.*) https://domain.com/go/instance2/$1
[I,L,R]

Then the ISAPI_Rewrite rule for friendly urls for instance2 looks like
this:
RewriteRule /go/instance2([^\?]*)(?:\?(.*))?
/instance2/go.cfm\?path=/go/instance2$1&$2 [I,L]

The ([^\?]*) is regular expression speak for "zero or more non-question mark
characters"
  - This will get the string of the rest of the friendly url path The
(?:\?(.*))? is regular expression speak for "string of all characters after
a question-mark, if any"
  - This will get the 'query_string'.
The extended path gets added to the path url parameter and the query_string
is appended, when the appropriate go.cfm is called.

If you just have a single farcry web with friendly urls at /go/, your rule
might just be:
RewriteRule /go([^\?]*)(?:\?(.*))? /go.cfm\?path=/go$1&$2 [I,L,R]

I didn't dig too deeply, so a set of options different from I,L,R might be
better.

Hope this is helpful!

-Tyler

Reply via email to