httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] mod_rewrite infinite loop problem
Date Sat, 26 Apr 2008 18:49:50 GMT
On Fri, Apr 25, 2008 at 4:32 PM, David Bylsma
<dbylsma@musiciansfriend.com> wrote:

>
>  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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message