Skip to content

Conversation

@Flole998
Copy link
Contributor

@Flole998 Flole998 commented Feb 3, 2017

Fix for Win Clients sometimes not connecting We discovered this during investigation of Issue #2887

Fix for Win Clients sometimes not connecting
@LukasReschke
Copy link
Member

So with "Win Client" you refer to Windows Explorer, correct?

@Flole998
Copy link
Contributor Author

Flole998 commented Feb 6, 2017

Yes, I am refering to Windows Explorer.

@MorrisJobke
Copy link
Member

@Flole998 Could you try this one here: #2986

@MorrisJobke
Copy link
Member

@michag86 Could you try this one for your windows clients?

@michag86
Copy link
Contributor

Works 👍

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} DavClnt
RewriteRule ^$ /remote.php/webdav/ [L,R=302]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only works for the root directory and if the RewriteBase is set. Please add this to

$content .= "\n RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]";
and remove the leading / before remote.php to be compatible with sub folders. Then this is good to go in

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my case RewriteBase was not in use and ist works.

And it's only required for the root directory. If Nextcloud ist installed in a sub directory, the problem does not occour.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And it's only required for the root directory. If Nextcloud ist installed in a sub directory, the problem does not occour.

But we would redirect to /remote.php/webdav/ instead of ´/sub/remote.php/webdav/`... even if it is never requested like this it could cause huge headaches.

@LukasReschke @nickvergessen Opinions of introducing a rewrite condition that works and fixes a problem if installed in root, but creates a redirect to "outside of nextcloud" for the sub directory install, but there it is never requested by Windows anyways. (I tested this and it works)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If Nextcloud ist installed in a sub directory, the "RewriteRule ^$" in the .htaccess of the sub directory will do nothing. Or am I wrong?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If Nextcloud ist installed in a sub directory, the "RewriteRule ^$" in the .htaccess of the sub directory will do nothing. Or am I wrong?

It does, because it get's only the stuff handed in within it's subdirectory. And then it redirect to the root (because of the leading slash in /remote.php/dav). Therefore I tested this with windows and it doesn't request the subdirectory.

@MorrisJobke MorrisJobke added this to the Nextcloud 12.0 milestone Feb 10, 2017
@MorrisJobke
Copy link
Member

@rullzer @nickvergessen @icewind1991 @schiessle @LukasReschke Please review this one

@MorrisJobke
Copy link
Member

Works 👍

@LukasReschke I would merge this one, because @michag86 also tested this.

@chises
Copy link

chises commented Mar 2, 2017

i am sorry but both fixes (.htaccess and lib/base.php) are not working for me. since OC 11.0.1 i got the issue that Windows Explorer asks 3 times for a username and Password
Apache Access logs:

10.10.10.1 - - [02/Mar/2017:12:21:21 +0100] "OPTIONS /remote.php/webdav HTTP/1.1" 401 4479 "-" "Microsoft-WebDAV-MiniRedir/10.0.14393"
10.10.10.1 - - [02/Mar/2017:12:21:21 +0100] "OPTIONS / HTTP/1.1" 200 3489 "-" "Microsoft-WebDAV-MiniRedir/10.0.14393"
10.10.10.1 - - [02/Mar/2017:12:21:21 +0100] "PROPFIND /remote.php/webdav HTTP/1.1" 401 1563 "-" "Microsoft-WebDAV-MiniRedir/10.0.14393"
10.10.10.1 - - [02/Mar/2017:12:21:24 +0100] "OPTIONS /remote.php/webdav HTTP/1.1" 401 4477 "-" "Microsoft-WebDAV-MiniRedir/10.0.14393"
10.10.10.1 -user [02/Mar/2017:12:21:24 +0100] "OPTIONS /remote.php/webdav HTTP/1.1" 503 1161 "-" "Microsoft-WebDAV-MiniRedir/10.0.14393"

@Flole998
Copy link
Contributor Author

Flole998 commented Mar 2, 2017

401 means unauthorized. It doesnt recognize your password. However, not related to this. Open a new issue please, however I do not think it is an issue. Also this is for nextcloud, I will assume that OC was just a typo. If your issue is really an owncloud issue, this is clearly the wrong place.

@chises
Copy link

chises commented Mar 2, 2017

i am sorry, OC was a typo.
i try to find the issue myself. if i stuck i will create a new issue :) TY so far

@ghost ghost mentioned this pull request Nov 11, 2017
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants