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
double slashes when redirecting (github page on custom domain) #178
Comments
It seems to come from your configuration, I can not reproduce your issue on jekyll's website: $ http --body https://jekyllrb.com/tutorials/
<!DOCTYPE html>
<html lang="en-US">
<meta charset="utf-8">
<title>Redirecting…</title>
<link rel="canonical" href="https://jekyllrb.com/tutorials/home/">
<meta http-equiv="refresh" content="0; url=https://jekyllrb.com/tutorials/home/">
<meta name="robots" content="noindex">
<h1>Redirecting…</h1>
<a href="https://jekyllrb.com/tutorials/home/">Click here if you are not redirected.</a>
<script>location="https://jekyllrb.com/tutorials/home/"</script>
</html> |
@DirtyF i'm not sure what i'm looking at in your example. i don't see any |
You' looking at Jekyll's website also using redirects on Github Pages https://github.com/jekyll/jekyll/blame/master/docs/_tutorials/index.md#L5 |
@DirtyF but i still don't see the same problem in the example you provided. So I don't understand what you mean. And seeing as my versions and the _config is the same in both my cases I'm still not sure what I can do to change the behaviour. |
I found the error. my config was using |
This seems like something we should proactively work to prevent. Care to open an issue in the jekyll/jekyll repo? |
@pathawks i can do that. just describe this case and the solution? (with a reference to this issue here) |
Hi
I've noticed something that i'm unable to explain properly. I'm not sure whether this is an error in my configuration, a difference in setup between my local machine and github pages, or something else. I'm posting it here in the hope that you can point me in the right direction.
First. I've installed the same version of jekyll (3.7.3) and jekyll-redirect-from (0.13.0) as what is listed as current on github: https://pages.github.com/versions/
When I'm using redirect_from on my jekyll page it works as expected locally. but on on the github page there is an extra slash.
As an example.
i redirect like this:
redirect_from: /summary/2017/
I don't know it is relevant, but my baseurl is "" (empty string).
When i curl the two different pages i get the following:
And on the github page:
The difference is in the
<script>
tag, and in the canonicallink
. As you will see there is a//
between my domain and the url path.Let me know if you need more information.
As mentioned I know this may not be the right place, so let me know if I should be asking somewhere else.
Anders
The text was updated successfully, but these errors were encountered: