marghoobsuleman / hashtagcms

HashtagCms, Use it as Headless CMS or Bundled, API enabled, Admin Panel, multisite, multi-tenant, multiplatform, multilingual with endless possibilities. The Most powerful, fast, user-friendly and secured platform. Made with PHP Laravel Framework.
https://www.hashtagcms.org
MIT License
18 stars 4 forks source link

[Feature request] Ability to add aliases for combined use of subdomains on multisites and for CDN #23

Closed DeRaja closed 2 years ago

DeRaja commented 2 years ago

Hello,

I have configured two domains: DomainOne.com and DomainTwo.com. However, if I give in the URL www.DomainOne.com and www.DomainTwo.com, I get an error (env=prod):

"Site has not been set up"

The adding of aliass of sites like www. is important. Secondly, one could configure subdomains pertaining to a language and parked it on the main domain, as follows:

en.DomainOne.com--->/home/xxx/public_html/hashtagcms/public
de.DomainOne.com--->/home/xxx/public_html/hashtagcms/public

en.DomainTwo.com--->/home/xxx/public_html/hashtagcms/public
de.DomainTwo.com--->/home/xxx/public_html/hashtagcms/public

Based on the aliases, Laravel + HashtagCMS could fetch respective contents based on site_id and lang_id. currently this is not possible.

DeRaja commented 2 years ago

Hi Marghoob,

One possibility would be to enter in the site--->edit a comma separated list of subdomains, like www.DomainOne.com, cdn.DomainOne.com, en.DomainOne.com, de.DomainOne.com, etc. The controller can fetch data from the database, check in the array and query further from site_ids.