MyBB Community Forums

Full Version: Rewrite Url in Nginx
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have set up my forum to use nginx as webserver.
The nginx configuration is based on this thread : http://community.mybb.com/thread-51764.html

When I check google Webmaster tools :
I get many error (404) like these :
http://www.valuebuddies.com/index.php/sh...n=lastpost
http://www.valuebuddies.com/index.php/me...e&uid=1153
In browsers, you'll get error message : No input file specified.

How to rewrite them to functional url like :
http://www.valuebuddies.com/showthread.p...n=lastpost
http://www.valuebuddies.com/member.php?a...e&uid=1153
or
http://www.valuebuddies.com/thread-2368-lastpost.html
http://www.valuebuddies.com/user-1153.html

Thanks.
Looks like you got it fixed?
Yes, I got it fixed with the help of this thread : http://community.mybb.com/thread-121755.html post#1

Then I added these 2 lines on redirect.txt :
rewrite ^/index\.php\/showthread\.php([^/]*)$ /showthread.php$1 permanent;
rewrite ^/index\.php\/member\.php([^/]*)$ /member.php$1 permanent;
The fact it's showing "no input file specified" is a bad sign though by the way: http://nginxlibrary.com/resolving-no-inp...ied-error/

You should really be getting a 404.
I have added these 2 lines in the block :

fastcgi_intercept_errors on;
try_files $uri =404;

Now, it redirect to 404, not "No input file specified." anymore.

Thank you very much.
Smile So this is all solved now? If so, please mark the thread as solved.