Skip to content

Commit 9111ba0

Browse files
committed
Rewrite favicon.ico to the right location
This could happen if the server crashes using the web UI. The browser sends a request to the /favicon.ico URL instead of /core/img/favicon.ico, which is configured in the ownCloud's web pages. Without this fix, the server responds with a 500 instead of a 200 or 404
1 parent 6910328 commit 9111ba0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/private/Setup.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,7 @@ public static function updateHtaccess() {
480480
if ($rewriteBase !== '') {
481481
$content .= "\n<IfModule mod_rewrite.c>";
482482
$content .= "\n Options -MultiViews";
483+
$content .= "\n RewriteRule ^favicon.ico$ core/img/favicon.ico [L]";
483484
$content .= "\n RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]";
484485
$content .= "\n RewriteRule ^core/preview.png$ index.php [PT,E=PATH_INFO:$1]";
485486
$content .= "\n RewriteCond %{REQUEST_FILENAME} !\\.(css|js|svg|gif|png|html|ttf|woff|ico|jpg|jpeg|json)$";

0 commit comments

Comments
 (0)