I came across this forum as I was running into similar issues with redirects in GitLab Pages. First, make sure the redirects are in a file called “_redirects” in the public directory. At first, I made a typo when naming the file, so obviously none of the redirects would work! The other reason seem… Answer from ColtonW on forum.gitlab.com
🌐
GitLab
docs.gitlab.com › gitlab docs › use gitlab › deploy and release your application › gitlab pages › redirects
GitLab Pages redirects | GitLab Docs
In GitLab Pages, you can configure rules to forward one URL to another using Netlify style HTTP redirects.
GitLab Docs
Learn how to use and administer GitLab, the most scalable Git-based fully integrated platform for software development.
Environments
Environments, variables, dashboards, and review apps.
GitLab Pages
When you use GitLab Pages with custom domains, you can redirect all requests to GitLab Pages to a primary domain. When the primary domain is selected, users receive 308 Permanent Redirect status that redirects the browser to the selected primary domain.
Releases
You can access the latest release page through a permanent link. GitLab always redirects the permanent link URL to the address of the latest release page.
🌐
GitLab
docs.gitlab.com › development › documentation › redirects
Redirects in GitLab documentation | GitLab Docs
In https://gitlab.com/gitlab-org/customers-gitlab-com, search for full URLs: ... If you want to move a file from one location to another, you do not move it. Instead, you duplicate the file, and add the redirect code to the old file. Create the new file. Copy the contents of the old file to the new one. In the old file, delete all the content. In the old file, add the redirect code and follow the rest of the steps in the Redirect to a page that already exists topic.
Discussions

"You are being redirected away from GitLab" pages don't redirect
For HTML artifacts, it actually used to render the page immediately. As I recall, due to an XSS security issue (because the HTML would run in the context of the domain gitlab.com), this has not been the case for maybe a couple years now. A similar XSS issue exists depending on how your pages [sub]domains are setup. So, as I understand it, to prevent someone from being pwned by clicking a gitlab.com link, you get the warning and the choice to click the button. That's also why now the default behavior for pages subdomains (for projects created after the issue was resolved) is to use a hash for each project. More on reddit.com
🌐 r/gitlab
13
2
May 22, 2024
Gitlab pages redirects do not work
The pages site is here https://perdmi.gitlab.io/docsite/ All I want is for https://perdmi.gitlab.io/docsite/ https://perdmi.gitlab.io/docsite/index https://perdmi.gitlab.io/docsite/index.html etc To redirect to https://perdmi.gitlab.io/docsite/Perdmi1888 Here are the redirects I have tried. More on forum.gitlab.com
🌐 forum.gitlab.com
3
0
February 22, 2024
GitLab Pages redirects
@Grob Can you point me to documentation? I can’t find anywhere this [[redirects]] table. Should it be inside config.toml? I tried it, but it didn’t work. More on discourse.gohugo.io
🌐 discourse.gohugo.io
1
0
December 10, 2018
GitLab Pages with custom domain redirects back to GitLab subdomain
It’s visible here with no problems: ... looks good on the Custom Domain page. It’s been over a day since I last changed the DNS, so the changes have propogated. However, when I go to https://tinie.st/, I’m redirected back to GitLab instead of staying o...... More on forum.gitlab.com
🌐 forum.gitlab.com
4
0
September 26, 2023
🌐
GitLab
forum.gitlab.com › general
Why is there a redirect when I try to access my Gitlab Pages site? - General - GitLab Forum
February 14, 2022 - I used to have my personal blog on Github. However, I would like to always keep the source code of my blog private. My subscription as student will end there this year and I think I will not be able to renew it. So, I thought about publishing my blog here, with Gitlab, where you have unlimited ...
🌐
OpenMSCG
software.rcc.uchicago.edu › help
Redirects · Pages · Project · User · Help · GitLab
In GitLab Pages, you can configure rules to forward one URL to another using Netlify style HTTP redirects.
🌐
Reddit
reddit.com › r/gitlab › "you are being redirected away from gitlab" pages don't redirect
r/gitlab on Reddit: "You are being redirected away from GitLab" pages don't redirect
May 22, 2024 -

We have a few links to CI artifacts in our READMEs and project badges, so that it's easy to get to generated documentation and reports. These links are in this sort of format:

https://gitlab.com/mygroup/myproject/-/jobs/artifacts/main/file/dir1/dir2/dir3/index.html?job=build

When following one of these links, GitLab serves a page that says "You are being redirected away from GitLab" and then it has a link to the actual artifact hosted on GitLab pages, like:

https://mygroup.gitlab.io/-/myproject/-/jobs/1234567890/artifacts/dir1/dir2/dir3/index.html

I seem to remember that these "redirect" pages used to actually redirect to the latter address after a second or two, but it seems that they now require that you click on the link.

Am I misremembering the old behavior? Is there some way to get that behavior? Does anyone else find it kind of annoying having to always click on that second link?

🌐
GitLab
forum.gitlab.com › how to use gitlab
Gitlab pages redirects do not work - How to Use GitLab - GitLab Forum
February 22, 2024 - The pages site is here https://perdmi.gitlab.io/docsite/ All I want is for https://perdmi.gitlab.io/docsite/ https://perdmi.gitlab.io/docsite/index https://perdmi.gitlab.io/docsite/index.html etc To redirect to https://perdmi.gitlab.io/docsite/Perdmi1888 Here are the redirects I have tried.
🌐
ETSI
forge.etsi.org › help › help
Redirects · Pages · Project · User · Help · GitLab
In GitLab Pages, you can configure rules to forward one URL to another using Netlify style HTTP redirects.
Find elsewhere
🌐
GitLab
forum.gitlab.com › how to use gitlab
GitLab Pages with custom domain redirects back to GitLab subdomain - How to Use GitLab - GitLab Forum
September 26, 2023 - It’s visible here with no problems: ... looks good on the Custom Domain page. It’s been over a day since I last changed the DNS, so the changes have propogated. However, when I go to https://tinie.st/, I’m redirected back to GitLab instead of staying o......
🌐
GitLab
gitlab.com › gitlab.org › gitlab-pages › #24
Add simple redirect configuration (#24) · Issues · GitLab.org / gitlab-pages · GitLab
September 18, 2020 - Problem to solve The current advice for redirects in GitLab pages is to use meta...
🌐
GitLab
docs.gitlab.com › gitlab docs › use gitlab › deploy and release your application › gitlab pages
GitLab Pages | GitLab Docs
In the left sidebar, select Deploy > Pages. From the Primary domain dropdown list, select the domain to redirect to. Select Save changes. ... Introduced in GitLab 17.4.
🌐
GitLab
docs.gitlab.com › gitlab docs › use gitlab › deploy and release your application › gitlab pages › settings
GitLab Pages settings | GitLab Docs
GitLab Pages offers configuration options to customize your static site’s deployment and presentation. With Pages settings, you can: Serve custom error pages for 403 and 404 responses. Configure URL redirects through _redirects files.
🌐
GitLab
gitlab.com › gitlab.org › repository
doc/user/project/pages/redirects.md · ccf068e52003a0f774505c0b378994141a59745d · GitLab.org / GitLab · GitLab
GitLab is an open source end-to-end software development platform with built-in version control, issue tracking, code review, CI/CD, and more. Self-host GitLab on your own servers, in a...
🌐
Reddit
reddit.com › r/gitlab › gitlab pages 'the redirect uri included is not valid.'
r/gitlab on Reddit: Gitlab Pages 'The redirect URI included is not valid.'
April 25, 2023 -

Hey guys,

I'm working on a migration of our Gitlab CE instance from a docker compose environment to a dedicated EC2 Runner and Server.

I've got everything working so for except Gitlab Pages. I've followed the documentation here: https://docs.gitlab.com/ee/administration/pages/

I've created the following DNS records.

A record for Gitlab git.dev.company.cloud

A record for Gitlab Pages gitdocs.dev.company.cloud

A record for wildcard *.gitdocs.dev.company.cloud

The omnibus configuration file contains: pages_external_url 'http://gitdocs.dev.company.cloud'

I navigate to the pages section of a project and click on the URL. A redirect begins, but instead of sending me to pages it sends me to my user page and displays:

An error has occurred
The redirect URI included is not valid.

The NGINX logs for pages show a 302 redirect, but that is about it...

Any help would be much appreciated!!

🌐
GitLab
support.gitlab.com › hc › en-us › articles › 22248532586396-GitLab-Pages-requests-redirect-to-sign-in-page-instead-of-loading-Pages-content
GitLab Pages requests redirect to sign-in page instead of loading Pages content – GitLab, Inc.
If the listen directives are not identical across the two server blocks, they end up in separate listen groups. In that case, requests that should be routed to GitLab Pages may instead be handled only by the main GitLab block, which results in a redirection loop back to the GitLab sign-in page.
🌐
GitLab
forum.gitlab.com › how to use gitlab
Gitlab Pages - Redirecting root directory - How to Use GitLab - GitLab Forum
July 31, 2022 - I want to redirect requests from example.org to example.org/pl/index.html. How do I do that? I’m putting a _redirects file in my public directory. the following rules do not work: /* /pl/index.html 302 / /pl/index.h…