Skip to content

Commit

Permalink
Rewrite favicon.ico to the right location
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jvillafanez committed Nov 28, 2019
1 parent 6910328 commit 9111ba0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/private/Setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ public static function updateHtaccess() {
if ($rewriteBase !== '') {
$content .= "\n<IfModule mod_rewrite.c>";
$content .= "\n Options -MultiViews";
$content .= "\n RewriteRule ^favicon.ico$ core/img/favicon.ico [L]";
$content .= "\n RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]";
$content .= "\n RewriteRule ^core/preview.png$ index.php [PT,E=PATH_INFO:$1]";
$content .= "\n RewriteCond %{REQUEST_FILENAME} !\\.(css|js|svg|gif|png|html|ttf|woff|ico|jpg|jpeg|json)$";
Expand Down

0 comments on commit 9111ba0

Please sign in to comment.