Skip to content

[Stable9] do not automatically try to enable index php less urls - #24540

Merged
PVince81 merged 3 commits into
stable9from
stable9-do-not-automatically-try-to-enable-index-php-less-urls
May 13, 2016
Merged

PVince81 merged 3 commits into
stable9from
stable9-do-not-automatically-try-to-enable-index-php-less-urls

Conversation

@LukasReschke

Copy link
Copy Markdown
Contributor

Approved backport of #24539 to stable9, also includes the repair step at b78625e

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.
@LukasReschke LukasReschke added this to the 9.0.3-current-maintenance milestone May 10, 2016
@rullzer

rullzer commented May 10, 2016

Copy link
Copy Markdown
Contributor

👍

@LukasReschke

Copy link
Copy Markdown
Contributor Author

Tested by other users in the linked issue. => 👍

@PVince81
PVince81 merged commit 56031fe into stable9 May 13, 2016
@PVince81
PVince81 deleted the stable9-do-not-automatically-try-to-enable-index-php-less-urls branch May 13, 2016 14:13
@enoch85 enoch85 mentioned this pull request May 30, 2016
1 task
@lock

lock Bot commented Aug 5, 2019

Copy link
Copy Markdown

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.

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants