1. 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

Discussion in 'Troubleshooting and Problems' started by shawn, Mar 4, 2012.

  1. shawn

    shawn Well-Known Member

    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:
        location /forum/ {
              try_files $uri /forum/index.php?$uri&$args;
              index index.php index.htm index.html;
    Nginx/Apache redirect:

    <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]
  2. Rob

    Rob Well-Known Member

    could this possibly be caused by some type of add-on?
  3. shawn

    shawn Well-Known Member

    Doubtful. The only add-on running on my dev board is XenES, and it still has the problem.
  4. Rob

    Rob Well-Known Member


    Your rules seems fine to me so i just assumed an addon
  5. shawn

    shawn Well-Known Member

    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. ;)
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    What is the error exactly?
  7. shawn

    shawn Well-Known Member

  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Is it a XenForo error page or a server error page? Said another way, is the request getting to XenForo at all?
  9. shawn

    shawn Well-Known Member

    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.
  10. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    So XenForo isn't seeing the request.

    Double check your rules:


    And make sure there is no directory called "account" or the request may be sent there.

    You said you already did these things, but I'm just going through the steps.
  11. shawn

    shawn Well-Known Member

    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.
  12. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I can only guess it's something with your server configuration.
  13. shawn

    shawn Well-Known Member

    Right. But what?

    I did get an idea, though... add an explicit rewrite rule in the nginx config file to change /account/avatar to index?/account/avatar. That ought to fix it... :LOL:
  14. shawn

    shawn Well-Known Member

    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: Jun 15, 2016
  15. Brogan

    Brogan XenForo Moderator Staff Member

    I've personally never seen it, and the only time I have seen it mentioned is in this thread.
  16. Mike

    Mike XenForo Developer Staff Member

    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.
  17. shawn

    shawn Well-Known Member

    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.

Share This Page