XF 1.5 Moving to root folder and NGINX

matagin

Member
Hi. I recently had my forums under /community and I moved everything to the root https://icewynd.net. The forums load but when I try to click on anything, I get 404 errors. I believe my individual forums/nodes lived under /forums but there is no subfolder for that. I also updated my board url to be https://icewynd.net.

I am using NGINX so I do not use .htaccess files.

I have these location blocks in the nginx config

Code:
location /community {
  rewrite ^/community/(.*)?$ /$1 redirect;
}

location /forums {
  rewrite ^/forums/(.*)?$ /$1 redirect;
}

And in the server block I have this

Code:
  rewrite ^community/(.*)?$ /$1 [R=301,L]
  rewrite ^forums/(.*)?$ /$1 [R=301,L]

Neither seem to work. I have also purged my Cloudflare cache and local browser cache and redirects don't seem to work.

Also, when I mouse over any of the forum titles, I still see /forums. I would like to change that but don't know how. And when I click on sign-up or anything else, I still get 404s.

Any advice or tips would be helpful.
 
I got it working. I commented everything out from the nginx config except this

Code:
location / {
        index index.php index.html index.htm;
        try_files $uri $uri/ /index.php?$uri&$args;
        include /usr/local/nginx/conf/503include-only.conf;
}

It still uses /forums even though that folder doesn't exist on the web server unless it's some kind of virtual directory.
 
Back
Top Bottom