Closed dandv closed 13 years ago
The post you linked to refers to a separate issue (where & is actually part of a file name before ?, which then gets broken by this crude workaround). It's unfortunate that MyBB appends ?/& blindly to URLs without checking whether ? is already present or not. Not much I can do about it.
Regarding your issue, it seems that nginx rewrite behaviour differs from Apache here. The workaround works fine with Apache's .htaccess, I just tested it. While I do use nginx myself, I can't offer you any support for it, since this plugin officially requires Apache+MySQL to work. Sorry.
You can try changing the MyBB SEF URL setting though; depending on whether SEF URL is set to Yes or No, the broken URLs will either bei url¶m or url?param?param. The workaround for the double ? case is implemented in Google SEO Redirect, maybe it will work with Nginx.
Maybe I'll just have to grab the entire page with output buffers and fix things myself. It certainly won't be fixed on MyBB's end.
I think that I can reproduce this bug. If I set MyBB SEF to enabled, I see blank page when I try access to page but if I select Automatic detection, I see this page normally.
I'm using Google SEO with MyBB 1.6.3 on nginx.
If I understand correctly, this rule needs to be added to the .conf file because otherwise, search.php is appended an ampersand instead of the question mark:
The problem I see on my board is that the whole query string gets URL-encoded, including the plus sign between keywords to be highlighted. This causes the highlight to not work.
Example on my board:
search.php
generates a list of threads or posts with URLs that are incorrect, i.e. have the ampersand:Then these get rewritten to replace the '&' with '?'. In the process, the + gets URL-encoded to %2B:
PS: All I could find relevant to this issue in the enormous thread on community.mybb.com was this post.