Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
3263 Visualizzazioni

Hello, 

How do you configure the dbfilter for a multiwebsite installation? 

I have my dbfilter set to ^%d$, which works well as long if I have one one website per database. But now I have one database that has 2 websites, I configured them to be:

1th website: domain.be

2th website: domain-b2b.domain.be

The name of the database is: domain

This works perfect for the 1th site (domain.be) but the second website goes to the 'create database page of odoo' which is the logical thing to do.

So how can I configure the domain filter so that both url's go to the same database. I did chose the url's so that the subdomain of the second site has the name of the first domain included (domain-b2b.domain.be) I hope this helps.

so both domain.be and domain-b2b.be should filter to the same database. 

I saw that oca has a a module that could possibly help, but it looks like it is not available yet for odoo15

Avatar
Abbandona

I have same the situation, but nothing i tried from documentation or this forum worked. My setting is like this :
one db : my_db with two companies : company1, company2.
I need to set two websites , with two differente domains
company1.com
company2.com
Has any figured out how to do it ?
Regards

Autore

Did you try my sollution bellow? What exactly isn't working?

Autore Risposta migliore

I figured out one way of doing this. I don't know if this is the right way to do. 

I changed the dbfilter from ^%d$ to ^%d this way the filter will direct any url that has part or the whole name of the database as the first characters in the subdomain to the database.

So, for my case: I renamed the name of the database to subdomain-b2b

My subdomains are:

subdomain-b2b.domain.be

subdomain.domain.be


Because both of the subdomains have part of the database name in their name they will both be directed to the database. 

This works for now, but let me know if there is a better way to do this. 

Thank you

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
dic 24
5046
0
dic 22
2268
2
mag 24
3336
0
mag 23
939
1
feb 22
2965