1

How can I configure apache2 to read multiple database and have multiple dbd maps on the same domain?

Example. I want this two htaccess lines to be both working:

RewriteRule ^(.*)$ ${firstmap:$1} [nc,L]
RewriteRule ^(.*)$ ${secondmap:$1} [nc,L]

(ignore the same matching pattern)

3
  • "multiple dbd maps on the same domain?" - Exactly the same way you set up the first one. (?) "(ignore tha same matching pattern)" - I'm finding it very hard to get past that!
    – MrWhite
    Jan 15, 2019 at 10:32
  • 1
    So, if you have two map names how do you define two different DBDParams, each on a differente database with different users? Jan 15, 2019 at 17:03
  • Ah, I see what you're saying now. Unfortunately, it doesn't look like that's possible (on the same "hostname"). DBDParams is defined once per vhost and the connection can't be "named" in any way AFAIK? The only workaround I see would be to create a separate vhost for another subdomain on "the same domain" in which you would define the second DBs params. This is a limitation of mod_dbd. mod_rewrite allows additional "options" to be set, but mod_dbd doesn't accept any AFAIK.
    – MrWhite
    Jan 15, 2019 at 18:31

0

You must log in to answer this question.

Browse other questions tagged .