MyBB Community Forums

Full Version: Google SEO plugins with NGINX ? (404 Not Found)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, recently I installed the Google SEO with NGINX. So I followed the documentation but nothing works.


        location / {
            rewrite ^/forum-([0-9]+)\.html$ /forumdisplay.php?fid=$1;
            rewrite ^/forum-([0-9]+)-page-([0-9]+)\.html$ /forumdisplay.php?fid=$1&page=$2;
            rewrite ^/thread-([0-9]+)\.html$ /showthread.php?tid=$1;
            rewrite ^/thread-([0-9]+)-page-([0-9]+)\.html$ /showthread.php?tid=$1&page=$2;
            rewrite ^/thread-([0-9]+)-lastpost\.html$ /showthread.php?tid=$1&action=lastpost;
            rewrite ^/thread-([0-9]+)-nextnewest\.html$ /showthread.php?tid=$1&action=nextnewest;
            rewrite ^/thread-([0-9]+)-nextoldest\.html$ /showthread.php?tid=$1&action=nextoldest;
            rewrite ^/thread-([0-9]+)-newpost\.html$ /showthread.php?tid=$1&action=newpost;
            rewrite ^/thread-([0-9]+)-post-([0-9]+)\.html$ /showthread.php?tid=$1&pid=$2;
            rewrite ^/post-([0-9]+)\.html$ /showthread.php?pid=$1;
            rewrite ^/announcement-([0-9]+)\.html$ /announcements.php?aid=$1;
            rewrite ^/user-([0-9]+)\.html$ /member.php?action=profile&uid=$1;
            rewrite ^/([^&]*)&(.*)$ https://mysite.com/$1?$2 permanent;
            rewrite ^/((?i)sitemap-([^./]+)\.xml)$ /misc.php?google_seo_sitemap=$2;

            try_files $uri $uri/ /index.php?$uri&$args;
        }

        location ~ /\.ht {
            deny  all;
        }

        location ~* \.(jpg|jpeg|gif|png|css|ico|xml)$ {
            access_log        off;
            log_not_found     off;
            expires           360d;
        }

[Image: iut_yf6_8821.png]

Thanks in advance ! Big Grin
Those rules look like the core MyBB URLs and not Google SEO.

Please go inside ACP > Configuration > Settigs > Google SEO URL

Your rewrite rules need to be based on the following settings:
* Forum URL scheme
* Thread URL scheme
* Thread Prefixes
* Announcement URL scheme
* User URL scheme
* Calendar URL scheme
* Event URL scheme

Your rewrite URLs only include a type identifier (forum, thread, post, etc) and the ID of the record; Google SEO generally has the name / title of the record and only includes the record ID if the URL isn't otherwise unique.