Skip to content

Commit

Permalink
Remove homepage redirect
Browse files Browse the repository at this point in the history
Previously, we were redirecting '/homepage' to '/' via:
a) publishing a special route for /homepage with a rendering application of frontend
b) redirecting these requests to '/' in the routes file in this application

This is a very old redirect, from before we had a lot of the publishing infrastructure.

We've now published an equivalent redirect in short url manager - see the list of live redirects here: https://short-url-manager.publishing.service.gov.uk/list_short_urls
This pushes the redirecting to the router level, making it consistent with other redirects on GOV.UK, and  means that we can now remove the redirect from the routes file, as well as the code to publish the content item, as this is already handled by short url manager.
  • Loading branch information
BeckaL committed Jun 23, 2023
1 parent 61add97 commit 868e5e7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

mount GovukPublishingComponents::Engine, at: "/component-guide"

get "/homepage" => redirect("/")

get "/random" => "random#random_page"

get "/healthcheck/live", to: proc { [200, {}, %w[OK]] }
Expand Down
6 changes: 0 additions & 6 deletions lib/special_route_publisher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ def publish(route_type, route)
def self.routes
{
exact: [
{
content_id: "ffcd9054-ee77-4539-978d-171a60eb4b2a",
base_path: "/homepage",
title: "GOV.UK homepage redirect",
description: "Redirects to /",
},
{
content_id: "caf90fb7-11e3-4f8e-9a5d-b83283c91533",
base_path: "/tour",
Expand Down

0 comments on commit 868e5e7

Please sign in to comment.