Skip to content

GitLab Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
G
gitlab-pages
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 143
    • Issues 143
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 17
    • Merge Requests 17
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GitLab.org
  • gitlab-pages
  • Issues
  • #24

Closed
Open
Opened Jul 12, 2016 by Nick Thomas@lupineContributor7 of 10 tasks completed7/10 tasks

Add simple redirect configuration

Problem to solve

The current advice for redirects in GitLab pages is to use meta refresh tags, which is a fairly poor experience for people used to building 1000-line-long nginx configuration files full of redirects.

Proposal

Is there scope for adding a simple redirect configuration specifically for GitLab pages? It could then serve the redirects itself as a HTTP 30x response. It'd just need a simple format text format specifying sourceurl, desturl, and optionally HTTP code (301/302/etc).

SSGs like Hugo could then write extension modules to take their lists of aliases and generate this file, rather than HTML pages for each.

MVP Implementation

Add support for basic 301 and 302 redirects using the Netlify plain text file syntax (_redirects).

/news /blog
/pit.html /spikes.html 302

We won't support any of the extra syntax options like query parameters, splats, rewrites in this iteration but can come after.

This is now implemented in !336 (merged) and documentation is in gitlab!42011 (merged)

To-do

  • Blocked by !325 (merged)
  • Acceptance tests
  • Benchmarks
    • https://dave.cheney.net/2013/06/30/how-to-write-benchmarks-in-go
    • https://golang.org/pkg/testing/#B.Error
  • Feature flag
  • Docs -> gitlab!42011 (merged)
  • Try out Netlify behavior of file overriding redirect, !336 (comment 403520570)
  • Add feature flag to https://ops.gitlab.net/gitlab-cookbooks/chef-repo and verify feature
    • https://docs.gitlab.com/ee/development/feature_flags/
    • https://ops.gitlab.net/gitlab-cookbooks/chef-repo/-/merge_requests/4246
  • Remove FF_ENABLE_REDIRECTS feature flag -> !357 (closed)
  • Remove docs for the feature flag too-> gitlab!42759 (closed)
    • gitlab!42011 (merged)
  • After merge and ship, remove from chef-repo
    • https://ops.gitlab.net/gitlab-cookbooks/chef-repo/-/merge_requests/4247
    • https://ops.gitlab.net/gitlab-cookbooks/chef-repo/-/merge_requests/4246

Edited Sep 18, 2020 by Eric Eastwood
Assignee
Assign to
13.4
Milestone
13.4 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: gitlab-org/gitlab-pages#24