diff --git a/apache_secure_data b/apache_secure_data
index 0cb74b1..fff46c8 100644
--- a/apache_secure_data
+++ b/apache_secure_data
@@ -21,8 +21,14 @@ Alias /nextcloud "@DATAPATH@/"
Require all denied
-Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav
-Redirect 301 /.well-known/caldav /nextcloud/remote.php/dav
-
Redirect 301 /ocm-provider/ /nextcloud/ocm-provider/
Redirect 301 /ocs-provider/ /nextcloud/ocs-provider/
+
+
+ RewriteEngine on
+ RewriteRule ^/\.well-known/host-meta /nextcloud/public.php?service=host-meta [QSA,L]
+ RewriteRule ^/\.well-known/host-meta\.json /nextcloud/public.php?service=host-meta-json [QSA,L]
+ RewriteRule ^/\.well-known/webfinger /nextcloud/public.php?service=webfinger [QSA,L]
+ RewriteRule ^/\.well-known/carddav /nextcloud/remote.php/dav/ [R=301,L]
+ RewriteRule ^/\.well-known/caldav /nextcloud/remote.php/dav/ [R=301,L]
+
diff --git a/nextcloud-18.0.3.tar.bz2 b/nextcloud-18.0.3.tar.bz2
deleted file mode 100644
index ce3f70e..0000000
--- a/nextcloud-18.0.3.tar.bz2
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:7b67e709006230f90f95727f9fa92e8c73a9e93458b22103293120f9cb50fd72
-size 86636651
diff --git a/nextcloud-18.0.4.tar.bz2 b/nextcloud-18.0.4.tar.bz2
new file mode 100644
index 0000000..4b466c2
--- /dev/null
+++ b/nextcloud-18.0.4.tar.bz2
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fad8e12632b352247ffc5ae181d4e414d732b9072caa0401774cfdb93a714329
+size 86677670
diff --git a/nextcloud-rpmlintrc b/nextcloud-rpmlintrc
new file mode 100644
index 0000000..42ebc63
--- /dev/null
+++ b/nextcloud-rpmlintrc
@@ -0,0 +1,6 @@
+# False positive
+addFilter('explicit-lib-dependency');
+# git files should not be removed, otherwise nextcloud rise up integrity check failure in some situations.
+addFilter('version-control-internal-file');
+addFilter('hidden-file-or-dir');
+addFilter('non-etc-or-var-file-marked-as-conffile');
diff --git a/nextcloud.changes b/nextcloud.changes
index b417b07..75eeee2 100644
--- a/nextcloud.changes
+++ b/nextcloud.changes
@@ -1,3 +1,12 @@
+-------------------------------------------------------------------
+Thu Apr 23 05:23:41 UTC 2020 - ecsos@opensuse.org
+
+- Update to 18.0.4
+ - No changelog from upstream at this time.
+
+- Add nextcloud-rpmlintrc to reduce build warnings.
+- Fix RewriteRules in apache_secure_data.
+
-------------------------------------------------------------------
Sun Apr 12 13:20:14 UTC 2020 - Olav Reinert
diff --git a/nextcloud.spec b/nextcloud.spec
index 8e58a7d..352883a 100644
--- a/nextcloud.spec
+++ b/nextcloud.spec
@@ -49,7 +49,7 @@
%endif
Name: nextcloud
-Version: 18.0.3
+Version: 18.0.4
Release: 0
Summary: File hosting service
License: AGPL-3.0-only
@@ -64,6 +64,7 @@ Source5: robots.txt
Source10: %{name}-cron
Source11: %{name}-cron.service
Source12: %{name}-cron.timer
+Source99: %{name}-rpmlintrc
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch