• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Can't get to /account/avatar with SEO turned on

shawn

Well-known member
#1
Just like the subject says. All the other links seem to work except for this one. If I manually add "index.php?" in front of avatar [edit] account/avatar, it works just fine. I checked for any random directory or file in the file system that might be confusing things, and also checked all the configs for any mention of account or avatar, thinking that maybe I had a conflicting rule someplace else. So far, no luck.

I've tried it both with Nginx/PHP-FPM and Nginx/Apache and had the same error both times.

Nginx/PHP-FPM redirect:
Code:
    location /forum/ {
          try_files $uri /forum/index.php?$uri&$args;
          index index.php index.htm index.html;
        }
Nginx/Apache redirect:

Code:
<Directory "path/to/forum">
<IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /forum
        RewriteCond %{REQUEST_FILENAME} -f [OR]
        RewriteCond %{REQUEST_FILENAME} -l [OR]
        RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule ^.*$ - [NC,L]
        RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
        RewriteRule ^.*$ index.php [NC,L]
</IfModule>
 

shawn

Well-known member
#5
That's fine... that's why I asked. Figured somebody might have a suggestion that I hadn't tried yet. And to be fair... I *did* go check my dev forum after you asked just to be sure of what was running. ;)
 

Jake Bunce

XenForo moderator
Staff member
#8
Is it a XenForo error page or a server error page? Said another way, is the request getting to XenForo at all?
 

shawn

Well-known member
#9
Yeah, if I click it from the user menu, I get a 404 in a Xenforo overlay. But it's the response from Nginx... says 404 Nginx, or something like that. If I put the URL straight in the address bar, I get a regular Nginx 404.
 

shawn

Well-known member
#11
Yeah, no directories or files named account or avatar (aside from the avatar subdir in data). And more confusing, that's the only link that doesn't work... account/signature, account/privacy, etc... they're all fine.
 

shawn

Well-known member
#14
Has anyone else run into this since I posted it years ago?

For some reason, when I moved Xenforo to the web root, the problem went away. That was probably three or four years ago.

I recently built a brand new server running nginx and php-fpm, migrated the forum to the new box, and... the problem is back. Xenforo is still in the web root, so that shouldn't be part of the problem.

Edit: I changed the link in navigation_visitor_tab to index.php?account/avatar/ and it works, but that's a crappy workaround.
 
Last edited:

Mike

XenForo developer
Staff member
#16
It would almost certainly be caused by something else in your Nginx configuration. Nginx only matches 1 location block per request, so if you have anything that matches "avatar", that's the likely cause.
 

shawn

Well-known member
#17
It would almost certainly be caused by something else in your Nginx configuration. Nginx only matches 1 location block per request, so if you have anything that matches "avatar", that's the likely cause.
I'd agree, but I don't see anything in the config files that should be tripping it up.

I'll post them after I get home tonight. Maybe y'all will see something that I'm overlooking. I'll try to remember to look at the nginx error logs, too. There might be some clues in there.