Hello.
This is more a question about webhosting-configuration but especially to connect to a nextcloudserver.
The adresses of my routers are very complicated and will change soon so i thought it would be nice if i had a simple link on my homepage that redirects to the complicated server adress.
So when the adress changes - for example when you buy a new router - i only have to change the redirection and all the clients should work properly.
My first attempt was to use a subdomain but unfortunately only my maindomain is SSL-certified, so this dod not work.
So i tried to use a .htaccess in my maindomain and
- created a file: nextcloud.html
and - created a file: .htaccess
with the following code:
Redirect /nextcloud.html http://dyndns-adress_of_my_router.net
This works when i use a browser but when i try to connect by the nextcloud-app (Windows) i get a
“ERROR 400 Bad Request”
from
“GET www.mydomain.net/nextcloud.html/status.php”
Feels a if i was close or is this the absolute wrong way?
SOLUTION:
The problem is, that most apps see a thread in any kind of “redirected” urls, so you have to take a more direct way.
Use CNAME in the configuration settings of your homepage/webspace and “redirect” a subdomain that way to your selfhosted server.
New problem: It only redirects port 80. Your service has to use this port (fortunately nextcloud does this as default), but if you have more than one service on your server, you need a REVERSE PROXY.