Re: RewriteMap question

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

 



On Wed, Jun 4, 2008 at 12:37 PM, Josh Trutwin <josh@xxxxxxxxxxxxxxxxxxx> wrote:
> On Wed, 4 Jun 2008 12:08:28 -0400
> "Joshua Slive" <joshua@xxxxxxxx> wrote:
>
>> > Is it possible to start multiple instances of this program?
>>
>> No, not directly.
>>
>> A few possibilities:
>>
>> 1. Try to do whatever you are doing without an prg: rewritemap.
>> These should really be a last resort for problems that are too
>> complicated to solve in any other way. Of course, since we don't
>> have any details of the problem, we can't help there.
>
> Actually this is an issue you helped me with quite a while ago.  I
> started without a rewrite map program and generated an htaccess file
> with rules to redirect our CMS's old URL's which looked like
> sitepages/pidXXX.php to a user-defined URL.  The .htaccess files grew
> extremely large for some sites so switched to a rewrite map program.
> Largest site I know of would have over 30k rules.  Is there a
> better solution for that kind of URL mapping size?

Just use a dbm rewritemap. These will be fast and scalable and don't
suffer from all the prg map problems.

>> 2. Call a php script directly to issue the redirect, rather than
>> going through mod_rewrite.
>
> I don't understand - can you explain?

I haven't tried it, but if you just point directly at the php script,
then if the script emits a Location header with the hostname/protocol
part, you might get an internal redirect.

>> 3. Have mod_rewrite split the request into several different paths
>> and use an independent rewritemap for each path. This could be as
>> simple as
>> RewriteCond %{REQUEST_URI} ^[a-n]
>> RewriteRule ... using map 1 [L]
>> RewriteRule ... using map 2
>
> This is a possibility assuming RewriteMap can be loaded from htaccess
> file - I currently have two rules that use the mapper for each but
> I'm not sure that will help much. The mapper itself needs a little
> optimization but there's not a whole lot I can do there.

I don't know why .htaccess files would matter.

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