Re: RewriteRule and AccelPass conflict

2002-06-24 Thread Robert Landrum

On Mon, Jun 24, 2002 at 05:37:51PM -0400, Philip Mak wrote:
 I'm trying to add a RewriteRule, but it's not working:
 
 RewriteEngine on
 RewriteCond %{HTTP_HOST} !^www.animewallpapers.com(:80)?$
 RewriteCond %{HTTP_HOST} !^64.246.28.97(:80)?$
 RewriteRule ^/(.*) http://www.animewallpapers.com/$1 [L,R]
 
 I want to make it so that if someone accesses that website via any
 hostname other than www.animewallpapers.com or 64.246.28.97, then it
 will redirect them to http://www.animewallpapers.com/. I copied those
 rules exactly from another httpd.conf where it works.
 
 However, the directives were being ignored. I realized the problem is
 probably because of this line:
 
 AccelPass / http://127.0.0.1:8010/
 


I would think that you would need something like the following. 

Location /
SetHandler rewrite accel
# rewrite rules and accel rules
/Location

Or something like that...  Your goal is to stack these handlers, so that
rewrite happens first and accel second.

I've never tried this, but it might work

Rob
-- 
Robert Landrum
Systems Programmer



Re: RewriteRule and AccelPass conflict

2002-06-24 Thread Philip Mak

On Mon, Jun 24, 2002 at 06:12:04PM -0400, Robert Landrum wrote:
 I would think that you would need something like the following. 
 
 Location /
 SetHandler rewrite accel
 # rewrite rules and accel rules
 /Location
 
 Or something like that...  Your goal is to stack these handlers, so that
 rewrite happens first and accel second.

That doesn't work:

$ apachectl configtest
Syntax error on line 1011 of /usr/local/apache/conf/httpd.conf:
SetHandler takes one argument, a handler name