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

Ensure original URLs are redirected (301 Moved Permanently) to normalized names, including pages that has redirects #6

Closed
2 of 3 tasks
renoirb opened this issue Jul 21, 2015 · 5 comments
Assignees

Comments

@renoirb
Copy link
Member

renoirb commented Jul 21, 2015

Once we have #3 addressed, we’ll have to configure web server to make proper HTTP redirection for funny URL names and others that may create conflicts (e.g. inconsistent casing #2)

Handle cases such as:

  • tutorials/What is CSS? into tutorials/What_is_CSS
  • concepts/accessibility/definitions/visual impairment into concepts/accessibility/definitions/visual_impairment
  • html/elements/!DOCTYPE into html/elements/DOCTYPE
  • svg/properties/animVal (SVGAnimatedString) into svg/properties/animVal_SVGAnimatedString
  • css/Properties/color into css/properties/color (notice "Properties" casing here)
  • css/properties/flex-align into css/properties/align-items (notice casing here too)

Objectives

  1. Keep original URLs in place
  2. Redirect to a valid URL that removes potential confusion (ref: URL "code-points", and RFC3986 at 3.3. Path)
  3. Make obvious mapping from URL into a file name in the source repository

Expected deliverables

Reference

@renoirb
Copy link
Member Author

renoirb commented Jul 29, 2015

URLs to test out.

Those are ones with quirky URLS MediaWiki was allowing that we must redirect.

To consider

  • use of %20 for space (and NOT +) has to be supported
  • use of _ as an interchangeable token for a space
    because its most likely that links in content might have been written like that and we can catch that case easily.

Questions

  • Should we support + as a space too?

Should handle URL with invalid character components to a valid location

Should handle redirects of deleted content with redirects left behind

Based on a few entries from reports/summary.yml that has a "redirect_to" flag.

In the following links; Does it really has links "with a space" in the page content (e.g. "[[canvas/tutorial/Canvas tutorial/Drawing shapes]]"), or only with an underscore (e.g. "[[canvas/tutorial/Canvas_tutorial/Drawing_shapes]]")

Should give message to disabled features

  • show a "Feature disabled" page.
  • return the same response body as requested (Accept: text/html to return HTML document, Accept: application/json to return a JSON string and so on)

Tests:

Redirect WPD pages into migrated content

Should handle translation and open the appropriate content

Should redirect anything /wiki/foo to /foo only at the end

Should sanitize URLs

Should be case InSeNsiTive

... and redirect at the same place location

http://67.205.56.184/wiki/apis/webrtc/objects/MediaStream/properties/videoTracks

http://67.205.56.184/wiki/Main_Page :

@renoirb
Copy link
Member Author

renoirb commented Jul 29, 2015

The redirect map is generated through the app/console mediawiki:summary and creates reports/nginx_redirects.map that we’ll have loaded in NGINX configuration.

@renoirb
Copy link
Member Author

renoirb commented Sep 16, 2015

Most use cases should work now!

@renoirb renoirb closed this as completed Sep 16, 2015
@renoirb renoirb self-assigned this Apr 6, 2016
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

No branches or pull requests

1 participant