Page 1 of 1

[SOLVED] Subdomains and folders

Posted: Fri Apr 08, 2022 6:34 pm
by pkihl
Hi Everyone

I am considering moving my wondercms site to a new hosting partner but have run into some issues that I would like to know if someone here has a good way to work around.

The new hosting partner has a simple and easy system to handle subdomains which would give me a better address than what I have today. You create a subfolder and it will turn into a subdomain as well. So subdomain.domain.com/page is equal to www.domain.com/subdomain/page. I do not know how this is made, but it is not based on anything in a .htaccess file.

But this handling of subdomains is also my problem. I started with Wondercms version 3.1.3 which did not like it at all, but with the upgrades to 3.2 and 3.3.1 the situation has improved, but not all the way.

If I use the www.domain.com/subdomain/page address everything works as expected.
But if I use the subdomain.domain.com/page address only the first page works. When I click on any menu item the new page is opened but without any styling at all. Both background colour and text size are gone. And if I then try to go to one more page in the menu the link is now subdomain.domain.com/subdomain/page. This still works for standard pages, but also without styling. I have the blog plugin installed, and it does not like this double subdomain at all and only shows Sorry, page not found.

Some way WonderCMS must understand that it is installed in a subfolder. Is there a way to tell WonderCMS not to care about where it is installed, and only use the link supplied by the visitor?

Or, is it better to create some rewrite rules in the .htaccess file in the folder?

Maybe there are other suggestions as well. All are very welcome.

Regards

Peter

Re: Subdomains and folders

Posted: Sat Apr 09, 2022 5:00 pm
by wiz
Hello @pkihl.

It would be easiest if you provided (you can even private message me your website URL), so it's easier to inspect what happens with the URL's to the styles. In general, WonderCMS shouldn't care where it's installed, but you might have found an issue which requires fixing.

After further inspection, I'll open a bug report on GitHub so this can be addressed in the future version.

Appreciate the feedback and thanks for dropping by.

Re: Subdomains and folders

Posted: Sat Apr 16, 2022 7:31 am
by Rexy
I has same problem with subdomains

Re: Subdomains and folders

Posted: Sat Apr 16, 2022 8:12 am
by wiz
Created GitHub issue and this should be addressed in the next version.

Link to GitHub issue: https://github.com/robiso/wondercms/issues/256

Re: Subdomains and folders

Posted: Sun May 22, 2022 10:42 am
by wiz
Hi Rexy and pkihi.
This has now been resolved with WonderCMS 3.3.2, however there still might be an issue with your host setup.

If you're using cPanel, please see this common error, where the subdomain also shows as a folder on that domain, this requires fixing on your host/settings: https://forums.cpanel.net/threads/sub-d ... me.457661/