Multi Domains

Create multiple domains or url and bind this to arbitry theme or page/staticpage with extending routing rules use single CMS installation (support backend)

Back to Multi Domains Support

james66572
james66572

Hi,

I installed the plugin today. We are using the latest release of October 1.

I have 2 domains, domain1.com and domain2.com. I want domain1.com to pass through just as normal. I want anything to domain2.com to route with the prefix /store.

I thought this looked simple, but I am unable to make it work.

I add https://domain2.com/ the "Domain Url to bind to select page" box on a new binding. Under the prefixing and suffixing tab, I enter /store into "Prefix for Page-url" (I enable for open full settings to see that tab) The page on the first tab i left on the ALL option.

I expect now that if I go to https://domain2.com/hello/1/world?test=testing - it should route to /store/hello/1/world?test=testing which should match the page/route /store/hello/:id/world What seems to be happening is it only ever routes to /store.

I have tried enabling hard mode, but it doesn't seem to make a difference. Enabling debug mode only confirms that its routing to /store, regardless of the request URL.

Could you possibly tell me what I am doing wrong?

Linkonoid
Linkonoid

Hi,

Unfortunately, the plugin has not been updated for a long time and a number of bugs have accumulated. They are fixed in the latest version v1.4.12 (I hope I fixed everything, maybe I missed something). I have not done a test for compatibility with v2 yet, I hope, if time permits, I will do it next week. In addition, a lot of unnecessary entries that break the logic of the plugin have accumulated in the database of the test server - I cleaned them up and now the demo works relatively stably.

Now on the question.

  • I think you have already done this, but just in case. Both domains must exist and be looking at the same OctoberCMS installation (i.e. showing the same thing when opened)
  • First of all, please see my settings on the test server. And in detail the address is https://params.test.linkonoid.com (the settings option is described there) In your case, there will be something like:
  • 1) Prefix for Page-url: "/store/hello"
  • 2) Presetting parameters for Page-url: ":id/:world?World"
  • 3) Remove page path parameters: play with this setting (I have not tested it in the latest versions, because this functionality was not in demand)
  • 4) Enable add GET-request to internal Page-url: on (for transmission ?Test=testing)
  • 5) Do not forget to set the parameters for the corresponding page in the binding (for my example "/prefixtest/:lang?en")
  • "Hard mode" is necessary (I generally plan to make it the default), without it there will be problems.

I hope this information will help you

Last updated

1-2 of 2