Skip to content

Conversation

@ArtificialOwl
Copy link
Member

@ArtificialOwl ArtificialOwl commented Jul 29, 2021

The idea is that on a setup of Nextcloud in a subfolder of the website, even with a Redirect from /.well-known/ to /nextcloud/.well-known the current .htaccess will try to reach /index.php instead of looking the local index.php

At the root of the domain:

Redirect "/.well-known/" "/nextcloud/.well-known/"

Rewrite will not work because the pathInfo is out of Nextcloud, the only way to fix this would be to add

	if ($pathInfo === '/.well-known/webfinger') {
		return $pathInfo;
	}

in https://github.com/nextcloud/server/blob/master/lib/private/AppFramework/Http/Request.php#L770

RewriteRule ^$ /remote.php/webdav/ [L,R=302]
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^\.well-known/carddav /remote.php/dav/ [R=301,L]
RewriteRule ^\.well-known/caldav /remote.php/dav/ [R=301,L]
Copy link
Member

Choose a reason for hiding this comment

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

Would make sense then to also support this for the dav related well-known urls here

@juliusknorr juliusknorr added this to the Nextcloud 23 milestone Aug 2, 2021
@szaimen szaimen added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Sep 13, 2021
@skjnldsv skjnldsv mentioned this pull request Oct 13, 2021
@skjnldsv skjnldsv modified the milestones: Nextcloud 23, Nextcloud 24 Oct 21, 2021
@skjnldsv skjnldsv mentioned this pull request Mar 24, 2022
@blizzz blizzz mentioned this pull request Mar 31, 2022
This was referenced Apr 7, 2022
@blizzz blizzz modified the milestones: Nextcloud 24, Nextcloud 25 Apr 21, 2022
This was referenced Aug 12, 2022
This was referenced Aug 24, 2022
This was referenced Sep 6, 2022
@ChristophWurst ChristophWurst deleted the fix/noid/well-known-on-subfolder-setup branch September 15, 2022 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants