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

Not working with Nginx #157

Closed
fabineves opened this issue Dec 13, 2016 · 11 comments
Closed

Not working with Nginx #157

fabineves opened this issue Dec 13, 2016 · 11 comments

Comments

@fabineves
Copy link

Since the last update to version 2.5, redirection stopped working.

I have a blog that I have to use Nginx Helper Plugin and since I made the update of redirection to 2.5, all urls returned 404. I disabled Nginx Helper plugin and it worked fine.

Since I can't leave my website without Nginx Helper plugin, I had to downgrade redirection to 2.4.5.

Is there anything to fix it?

Thanks in advance.

@Lewiscowles1986
Copy link

This works on nginx, I'm running it on 2 sites.

@fabineves
Copy link
Author

If you use a plugin called Nginx helper, all the urls will return 404 with the new version. That's my issue.
It was working fine before the last update.

@johngodley
Copy link
Owner

johngodley commented Dec 22, 2016

I don't use Nginx Helper, and running the plugin alongside Redirection doesn't break my site. I can't see anything obvious that would cause a problem between these two plugins.

The commits are listed here:

https://github.com/johngodley/redirection/commits/master

If it's possible for you to use git bisect to help me locate the commit that caused the issue then it will help me make whatever changes are needed.

@matt-h
Copy link

matt-h commented Dec 22, 2016

I have been having this issue as well. I just tested the commit history and this commit is where it breaks. Anything from then on has the issue.
f44b730

@matt-h
Copy link

matt-h commented Dec 22, 2016

I see the issue Nginx Helper overrides the wp_redirect function but doesn't return true on success.
https://github.com/rtCamp/nginx-helper/blob/master/nginx-helper.php#L360-L377

@johngodley
Copy link
Owner

Ah, thanks @matt-h that's super helpful!

@matt-h
Copy link

matt-h commented Dec 22, 2016

^ I created that pull request to Nginx Helper which fixes this.

@fabineves
Copy link
Author

Thanks Matt, I don't understand about this much, so I'm glad you could help the developer.

chandrapatel pushed a commit to rtCamp/nginx-helper that referenced this issue Dec 22, 2016
wp_redirect should return true on success

The core WP function does this and it should for compatibility.
https://developer.wordpress.org/reference/functions/wp_redirect/

Uncovered in this issue with Redirection johngodley/redirection#157
@chandrapatel
Copy link

Hi @matt-h @fabineves

I have released Nginx Helper plugin which address this issue. Please check and let me know if its fine.

Regards,
Chandra

@fabineves
Copy link
Author

Thank you very much! Everything working fine now!

@johngodley
Copy link
Owner

Thanks everyone, closing this ticket

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

No branches or pull requests

5 participants