• POST_PART rewrite info is missing from your rewrite rules ‘hack’ for nginx
    otherwise sites with multiple post.xml files get 404 no found…

    rewrite ^/sitemapindex\.xml$ /index.php?gxs_module=sitemapindex last;
    rewrite ^/post\.xml$ /index.php?gxs_module=post last;
    rewrite ^/page\.xml$ /index.php?gxs_module=page last;

    ADDED
    rewrite ^/([a-z0-9]+)_([a-z0-9_-]+)\.xml$ /index.php?gxs_module=$1&gxs_sub_module=$2 last;

    rewrite ^/post_google_news\.xml$ /index.php?gxs_module=post_google_news last;
    rewrite ^/taxonomy_category\.xml$ /index.php?gxs_module=taxonomy_category last;

    https://www.ads-software.com/plugins/bwp-google-xml-sitemaps/

Viewing 2 replies - 1 through 2 (of 2 total)
  • This still does not work on a multisite. Get 404 while trying to access the sitemaps.
    Any update on the re-write rules?

    Axel

    Resolved the issue with the following addition to nginx.conf

    MULTISITE

    if (!-e $request_filename) {
    			rewrite /wp-admin$ $scheme://$host$uri/ permanent;	
    			rewrite ^(/[^/]+)?(/wp-.*) $2 last; 
    			rewrite ^(/[^/]+)?(/.*\.php) $2 last; 
    			rewrite /sitemapindex\.xml$ /index.php?gxs_module=sitemapindex last;
    			rewrite /post\.xml$ /index.php?gxs_module=post last;
    			rewrite /page\.xml$ /index.php?gxs_module=page last;
    			rewrite /([a-z0-9]+)_([a-z0-9_-]+)\.xml$ /index.php?gxs_module=$1&gxs_sub_module=$2 last;
    			rewrite /post_google_news\.xml$ /index.php?gxs_module=post_google_news last;
    			rewrite /taxonomy_category\.xml$ /index.php?gxs_module=taxonomy_category last;
    		}
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘UPDATE YOUR DOCUMENTATION/FAQS NGINX REWRITE RULES ARE WRONG (CORRECT ONES HERE)’ is closed to new replies.