diff --git a/apps/files_sharing/lib/controllers/externalsharescontroller.php b/apps/files_sharing/lib/controllers/externalsharescontroller.php
index 4b921f6fae8693b690afccc0dc3372b7087e76a9..be65a490393a6b962979d773ee52d801567806d2 100644
--- a/apps/files_sharing/lib/controllers/externalsharescontroller.php
+++ b/apps/files_sharing/lib/controllers/externalsharescontroller.php
@@ -130,13 +130,13 @@ class ExternalSharesController extends Controller {
 	 */
 	public function testRemote($remote) {
 		if (
-			$this->testUrl('https://' . $remote . '/ocs-provider') ||
+			$this->testUrl('https://' . $remote . '/ocs-provider/') ||
 			$this->testUrl('https://' . $remote . '/ocs-provider/index.php') ||
 			$this->testUrl('https://' . $remote . '/status.php', true)
 		) {
 			return new DataResponse('https');
 		} elseif (
-			$this->testUrl('http://' . $remote . '/ocs-provider') ||
+			$this->testUrl('http://' . $remote . '/ocs-provider/') ||
 			$this->testUrl('http://' . $remote . '/ocs-provider/index.php') ||
 			$this->testUrl('http://' . $remote . '/status.php', true)
 		) {
diff --git a/apps/files_sharing/lib/external/storage.php b/apps/files_sharing/lib/external/storage.php
index 7f54a955da2418999ad2f9323e36c925db73ff20..c23b273c2eb3eb59a98b2827ce30a4d644d25214 100644
--- a/apps/files_sharing/lib/external/storage.php
+++ b/apps/files_sharing/lib/external/storage.php
@@ -225,7 +225,7 @@ class Storage extends DAV implements ISharedStorage {
 	protected function testRemote() {
 		try {
 			return $this->testRemoteUrl($this->remote . '/ocs-provider/index.php')
-				|| $this->testRemoteUrl($this->remote . '/ocs-provider')
+				|| $this->testRemoteUrl($this->remote . '/ocs-provider/')
 				|| $this->testRemoteUrl($this->remote . '/status.php');
 		} catch (\Exception $e) {
 			return false;