Forcing CF to send a request back to Apache?

2004-09-03 Thread Richard Crawford
Okay, this is complicated, and I apologize for that.

First of all, our website runs a mix of Cold Fusion and Perl scripts. 
This is generally fine, except that Perl scripts don't run if the 
context-root in included in the path to the script.

Is there a way to force the Cold Fusion server to send an HTTP request 
back to Apache?Thus,

http://mysite.com/cfmx/perl/script.pl

would become

http://mysite.com/perl/script.pl

As it is, if the context-root is included in the URL for the Perl 
script, the script doesn't run and the user sees the Perl source code 
instead.

Any thoughts?

-- 
Richard S. Crawford
Programmer III: Oracle/Solaris Wrangler
UC Davis Extension Distance Education Group (http://unexdlc.ucdavis.edu)
2901 K Street, Suite 200C
Sacramento, CA95816
(916)327-7793
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: Forcing CF to send a request back to Apache?

2004-09-03 Thread Barney Boisvert
You can't make CF do it, but you can certainly do that with
mod_rewrite.These two rules should be pretty close, though they
might not be perfect.(obviously assume your server has mod_rewrite
enabled):

RewriteEngine On
RewriteRule ^/cfmx(.*\.pl)$ /$1.pl [L]

The rewrite phase of Apache's request processing happens before it
hand off to JRun/CFMX, so the request will be moved out of the CFMX
context root before being sent to CF at all.

cheers,
barneyb

On Fri, 03 Sep 2004 12:54:54 -0700, Richard Crawford
[EMAIL PROTECTED] wrote:
 Okay, this is complicated, and I apologize for that.
 
 First of all, our website runs a mix of Cold Fusion and Perl scripts.
 This is generally fine, except that Perl scripts don't run if the
 context-root in included in the path to the script.
 
 Is there a way to force the Cold Fusion server to send an HTTP request
 back to Apache?Thus,
 
 http://mysite.com/cfmx/perl/script.pl
 
 would become
 
 http://mysite.com/perl/script.pl
 
 As it is, if the context-root is included in the URL for the Perl
 script, the script doesn't run and the user sees the Perl source code
 instead.
 
 Any thoughts?
 

-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: Forcing CF to send a request back to Apache?

2004-09-03 Thread Dave Watts
 Is there a way to force the Cold Fusion server to send an 
 HTTP request back to Apache?Thus,
 
 http://mysite.com/cfmx/perl/script.pl
 
 would become
 
 http://mysite.com/perl/script.pl
 
 As it is, if the context-root is included in the URL for the 
 Perl script, the script doesn't run and the user sees the 
 Perl source code instead.

This is just a shot in the dark, but maybe you could address this with
mod_rewrite in Apache?

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: 202-797-5496
fax: 202-797-5444
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: Forcing CF to send a request back to Apache?

2004-09-03 Thread Richard Crawford
Barney Boisvert wrote:

 You can't make CF do it, but you can certainly do that with
 mod_rewrite.These two rules should be pretty close, though they
 might not be perfect.(obviously assume your server has mod_rewrite
 enabled):
 
 RewriteEngine On
 RewriteRule ^/cfmx(.*\.pl)$ /$1.pl [L]
 
 The rewrite phase of Apache's request processing happens before it
 hand off to JRun/CFMX, so the request will be moved out of the CFMX
 context root before being sent to CF at all.

It worked with a bit of modification:

RewriteRule ^/cfmx(.*\.pl)$ /$1 [L]

This puts two /'s in the URL before the filename for some reason, but if 
I insert another / between cfmx and (.*\.pl), I get a redirection error. 
This will do for now.Also, with the .pl after the $1, the URL had 
two .pl's appended. ;-)

Thanks!

-- 
Richard S. Crawford
Programmer III: Oracle/Solaris Wrangler
UC Davis Extension Distance Education Group (http://unexdlc.ucdavis.edu)
2901 K Street, Suite 200C
Sacramento, CA95816
(916)327-7793
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: Forcing CF to send a request back to Apache?

2004-09-03 Thread Barney Boisvert
Whoops, my bad.I bet if you remove the / before the $1 it'll fix
the double slash problem too.That's what I get for shooting that off
the cuff on a Friday afternoon, immediately before a holiday weekend.

Glad it worked enough to get you going though.

cheers,
barneyb

On Fri, 03 Sep 2004 16:00:52 -0700, Richard Crawford
[EMAIL PROTECTED] wrote:
 Barney Boisvert wrote:
 
  You can't make CF do it, but you can certainly do that with
  mod_rewrite.These two rules should be pretty close, though they
  might not be perfect.(obviously assume your server has mod_rewrite
  enabled):
 
  RewriteEngine On
  RewriteRule ^/cfmx(.*\.pl)$ /$1.pl [L]
 
  The rewrite phase of Apache's request processing happens before it
  hand off to JRun/CFMX, so the request will be moved out of the CFMX
  context root before being sent to CF at all.
 
 It worked with a bit of modification:
 
 RewriteRule ^/cfmx(.*\.pl)$ /$1 [L]
 
 This puts two /'s in the URL before the filename for some reason, but if
 I insert another / between cfmx and (.*\.pl), I get a redirection error.
This will do for now.Also, with the .pl after the $1, the URL had
 two .pl's appended. ;-)
 
 Thanks!

-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]