Repository navigation
Do not automatically try to enable index.php-less URLs - #24539
Merged
DeepDiver1975 merged 1 commit intoMay 12, 2016
Merged
Conversation
The current logic for mod_rewrite relies on the fact that people have properly configured ownCloud, basically it reads from the `overwrite.cli.ur l` entry and then derives the `RewriteBase` from it. This usually works. However, since the ownCloud packages seem to install themselves at `/owncloud` (because subfolders are cool or so…) _a lot_ of people have just created a new Virtual Host for it or have simply symlinked the path etc. This means that `overwrite.cli.url` is wrong, which fails hard if it is used as RewriteBase since Apache does not know where it should serve files from. In the end the ownCloud instance will not be accessible anymore and users will be frustrated. Also some shared hosters like 1&1 (because using shared hosters is so awesome… ;-)) have somewhat dubious Apache configurations or use versions of mod_rewrite from the mediveal age. (because updating is money or so…) Anyhow. This makes this explicitly an opt-in configuration flag. If `htaccess.RewriteBase` is set then it will configure index.php-less URLs, if admins set that after installation and don't want to wait until the next ownCloud version they can run `occ maintenance:update:htaccess`. For ownCloud 9.0 we also have to add a repair step to make sure that instances that already have a RewriteBase configured continue to use it by copying it into the config file. That way all existing URLs stay valid. That one is not in this PR since this is unneccessary in master. Effectively this reduces another risk of breakage when updating from ownCloud 8 to ownCloud 9. Fixes #24525, #24426 and probably some more.
Contributor
|
hmm. I get the fix. But this is fragile and close to impossible to test all scenarios. |
Contributor
|
Yes. Should prevent a lot of unhappy users. But I'm no apache wizzard (or regular user) so other people please test as well. |
Closed
|
Works! 👍 |
DeepDiver1975
deleted the
i-for-one-welcome-my-fight-with-the-crappy-web-servers
branch
May 12, 2016 07:43
This was referenced May 18, 2016
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current logic for mod_rewrite relies on the fact that people have properly configured ownCloud, basically it reads from the
overwrite.cli.ur lentry and then derives theRewriteBasefrom it.This usually works. However, since the ownCloud packages seem to install themselves at
/owncloud(because subfolders are cool or so…) a lot of people have just created a new Virtual Host for it or have simply symlinked the path etc.This means that
overwrite.cli.urlis wrong, which fails hard if it is used as RewriteBase since Apache does not know where it should serve files from. In the end the ownCloud instance will not be accessible anymore and users will be frustrated. Also some shared hosters like 1&1 (because using shared hosters is so awesome… ;-)) have somewhat dubious Apache configurations or use versions of mod_rewrite from the mediveal age. (because updating is money or so…)Anyhow. This makes this explicitly an opt-in configuration flag. If
htaccess.RewriteBaseis set then it will configure index.php-less URLs, ifadmins set that after installation and don't want to wait until the next ownCloud version they can run
occ maintenance:update:htaccess.For ownCloud 9.0 we also have to add a repair step to make sure that instances that already have a RewriteBase configured continue to use it by copying it into the config file. That way all existing URLs stay valid. That one is not in this PR since this is unneccessary in master.
Effectively this reduces another risk of breakage when updating from ownCloud 8 to ownCloud 9.
Fixes #24525, #24426 and probably some more.
cc @karlitschek I'd propose a backport to stable9. I'll make sure to also add a repair step there so that for users that already use
index.php-less URLs nothing changes.cc @rullzer As discussed. Mind a review? THX a lot 🚀
stable9 at #24540