Re: mod_rewrite infinite loop problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 25, 2008 at 4:32 PM, David Bylsma
<dbylsma@xxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux