Ns8 Nextcloud migration - permanent redirect

Not really a nethserver feature, but something I found out during Nextcloud migration: the ns8-migration app disables nextcloud and puts a redirection webpage in place.

I added a .htaccess file with a permanent redirect. The nextcloud desktop client (latest versions) will change the nextcloud URL accordingly. Nice feature.

Android / IOS clients give a user warning, and need to be reconfigured manually.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} ^/nextcloud(/.*)?$ [NC]
RewriteRule ^ https://[new nextcloud URL]/ [R=301,L]
</IfModule>

See nextcloud forum - solution post

4 Likes

Nice idea, it might be added to the Nextcloud migration tool script, for example here: nethserver-ns8-migration/root/usr/share/nethesis/nethserver-ns8-migration/apps/nethserver-nextcloud/migrate at 6b8e1bc7f360ca678578c0c1006c971bd14655b5 · NethServer/nethserver-ns8-migration · GitHub

1 Like