Java Mailing List Archive

http://www.apache-httpd.com/

Home » users.httpd »

Re: [users@httpd] mod_rewrite infinite loop problem

Joshua Slive

2008-04-26

Replies:

Author LoginPost Reply
On Fri, Apr 25, 2008 at 4:32 PM, David Bylsma
<dbylsma@(protected):

>
> Is there a simpler way?

I would probably avoid the program rewrite map (which is a potential
bottleneck). There are several ways to do this. One very simple one
would be to make your RewriteRule something like
RewriteRule .* /product/{sku_to_path:%1}?rewritten [QSA,R=301,L]
and then use a RerwiteCond to avoid applying the RewriteRule whenever
"rewritten" is in the query string.

Another solution would be to have two text maps: sku_to_path and
another listing only the sku's that need to be changed. Then you can
have a new RewriteRule that is applied to /product/ URLs only if the
sku is in the list of sku's that need to be changed.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@(protected)
 "  from the digest: users-digest-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 apache-httpd.com - Jax Systems, LLC, U.S.A.