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

Problem with in-page redirect #781

Closed
sebastianha opened this issue Apr 11, 2016 · 6 comments
Closed

Problem with in-page redirect #781

sebastianha opened this issue Apr 11, 2016 · 6 comments

Comments

@sebastianha
Copy link

Hi,

I have a problem with redirects configured directly in the page header. I use a fresh installed grav, version 1.0.10, I just added user pages like the following:

/home/default.md:


---
title: Home
visible: false
redirect: '/content-2'

---

and

/00000.2/default.md:


---
title: Test
routes:
  default: '/content-2'

---

When I access my main page ("/") or the page "/content-2" I get always redirected to "/content-2". This leads to "Too many redirects" as the site redirects to itself.

With Version 1.0.5 this worked, now it doesn't. Any Idea what I am doing wrong?

@flaviocopes
Copy link
Contributor

Not able to reproduce, not sure if there's an external/unconsidered possible cause.
Can you try replicating with a clean skeleton?

@sebastianha
Copy link
Author

Mmmh, it was a clean install, just unzip and create the two user pages.
I also tried just to create a second user page but I have the same problem: As soon as I add the redirect to the home page every site redirects to the targeted page.
I am using NGINX and PHP 5.6.20. I will try it on another system.

@flaviocopes
Copy link
Contributor

Do you mind sending me the user/ folder zipped via Gitter PM? Maybe I
tested the wrong page.

Il giorno lun 11 apr 2016 alle ore 19:17 Sebastian Hammerl <
notifications@github.com> ha scritto:

Mmmh, it was a clean install, just unzip and create the two user pages.
I also tried just to create a second user page but I have the same
problem: As soon as I add the redirect to the home page every site
redirects to the targeted page.
I am using NGINX and PHP 5.6.20. I will try it on another system.


You are receiving this because you commented.

Reply to this email directly or view it on GitHub
#781 (comment)

@rhukster
Copy link
Member

I have confirmed that a redirect on the home alias causes this problem. Redirects on other pages, including multiple redirects works fine. I'm not sure why you would want a redirect on the homepage, (just change the home: alias !) but I guess this is a bug :)

@rhukster rhukster added the bug label Apr 12, 2016
@sebastianha
Copy link
Author

Thanks for confirming this!

I am generating the user pages from DB content (including the homepage) and I only want to touch the pages folder. That's why I am doing the redirect here and not in the configuration files.

@rhukster
Copy link
Member

Ok sorted it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants