polr
polr copied to clipboard
Multiple Domains Support
It would be nice to have support for multiple domains (or subdomains) on one installation. For instance, we have a Canadian branch that would like to use a different subdomain than our main one. Some of the links would have the same ending, but would lead to either the US page or the Canadian page based on the domain (like us.domain.com/sales and ca.domain.com/sales).
Expected Behavior
When creating a link, I would expect there to be a drop-down list populated with the available domain names.
Current Behavior
Currently, two installations of the software are required to accomplish this.
Possible Solution
The .env would look like APP_ADDRESS=us.domain.com,ca.domain.com
. I suppose the SETTING_INDEX_REDIRECT
directive would also need to be comma separated to accommodate this logically, and the setup script would need to be modified so that more fields could be added for multiple domains and multiple redirects (maybe a matrix or grid).
On the database side, a field would need to be added to the links accepting an integer (surely a TINYINT would be sufficient) to keep track of which domain the link is for.
Context
(From the description above) We have a Canadian branch that would like to use a different subdomain than our main one. Some of the links would have the same ending, but would lead to either the US page or the Canadian page based on the domain (like us.domain.com/sales and ca.domain.com/sales).
There is a - non technical non really separated way. I use three domains in "sync". The main Installation is set to "ref.li". The two other domains (one named "goes.li") are configured as 301 redirects to "ref.li" domain.
Every shortlink is use able with all domains.
https://goes.li/sAMpl3 works in sync with https://ref.li/sAMpl3
@force73's solution could work, although it seems like @stevish-com is looking to use the same ending for two different domains.
We're actually working on a "managed" multi-domain solution like bit.ly enterprise built atop Polr (open source, of course!), so managing multiple domains on one installation should be no problem in the future :)
Will keep you updated when we're ready to test.
Sounds great. Just posted my workaround for the moment.
Any updates on this? 🙂
i would love this as well! any news on this front? i figured as well that one could do the redirect idea mentioned above on the web server end but to have one polr instance truly manage multiple domains would be nice. and please excuse me if this has happened already and i've simply not noticed it yet.