Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redirect to root when file not found #2493

Merged
merged 1 commit into from
Sep 15, 2021
Merged

Conversation

wkloucek
Copy link
Contributor

@wkloucek wkloucek commented Sep 13, 2021

Description

Web owns the "/" route in oCIS proxy which will match everything not matching any other more specific route. All these requests will end in the static file serve block which just returns a 404 not found. Ideally we would display a dedicated not found page which is should be included in the static files. Until we have a site like this we can redirect requests to the root, from which oC Web is served. This helps people having non valid links (eg. oC 10 links like https://foo.bar/index.php/apps/pdfviewer...) to not beeing stuck to a blank page saying "not found".

Related Issue

Motivation and Context

Bookmarked links from eg. ownCloud 10 which are no longer supported after an migration will lead to ownCloud web instead displaying a blank page (with the text "not found").

How Has This Been Tested?

  • locally

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@update-docs
Copy link

update-docs bot commented Sep 13, 2021

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@wkloucek wkloucek force-pushed the web_not_found_redirect branch from 4162bcd to 5298b4b Compare September 13, 2021 17:33
@wkloucek wkloucek requested review from butonic and removed request for pascalwengerter September 13, 2021 17:34
@wkloucek wkloucek mentioned this pull request Sep 13, 2021
9 tasks
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@wkloucek wkloucek requested a review from refs September 15, 2021 09:35
@butonic butonic merged commit b0f0d6a into master Sep 15, 2021
@delete-merged-branch delete-merged-branch bot deleted the web_not_found_redirect branch September 15, 2021 11:53
ownclouders pushed a commit that referenced this pull request Sep 15, 2021
Merge: a9422c5 5298b4b
Author: Jörn Friedrich Dreyer <jfd@butonic.de>
Date:   Wed Sep 15 13:53:19 2021 +0200

    Merge pull request #2493 from owncloud/web_not_found_redirect

    redirect to root when file not found
wkloucek added a commit that referenced this pull request Sep 15, 2021
wkloucek added a commit that referenced this pull request Sep 15, 2021
wkloucek added a commit that referenced this pull request Sep 16, 2021
wkloucek added a commit that referenced this pull request Sep 16, 2021
fix: redirect invalid links to oC Web (#2493)
ownclouders pushed a commit that referenced this pull request Sep 16, 2021
Merge: ab84c4c 09b4850
Author: Willy Kloucek <34452982+wkloucek@users.noreply.github.com>
Date:   Thu Sep 16 13:58:15 2021 +0200

    Merge pull request #2512 from owncloud/fix_pull_2493

    fix: redirect invalid links to oC Web (#2493)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants