2018-05-10, 12:19 PM
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;
}
Thanks in advance !