URL rewrites in Nginx are not working for me..?

140 views Asked by At

I'm running Vanilla Forum, and version 2.1.10 works just fine on my server which uses Apache and Nginx together. I'm trying to update to Vanilla 2.3 and I'm running into rewrite issues where I end up with 404 Not Found on all my forum pages.

Their README states:

First, confirm your server is setup to handle rewrites. On Apache, using the .htaccess file provided will accomplish this. Additional setup is required on nginx and other platforms.

It doesn't provide any details about what to actually do in Nginx to get it working, though. I've found a bunch of forum threads that have various "fixes" in Nginx vhost file, but none of them are working for me. The simplest version was to do this:

 location /forum
 {
 try_files $uri $uri/ @forum;
 }
 location @forum
 {
 rewrite ^/forum(.+)$ /forum/index.php?p=$1 last;
 }

That is not working for us either, though. I simply cannot get anything but 404 to come up in Vanilla 2.3.

If I restore my 2.1.10 site files and database everything works fine, and it's already using URL rewrites, so it seems Nginx config does work fine with htaccess in that version.

Any information on how I could get this working or why rewrites wouldn't be working in Vanilla 2.3 would be greatly appreciated. Thanks!

0

There are 0 answers