[SOLVED] Subdomains and folders
Posted: Fri Apr 08, 2022 6:34 pm
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
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