Video Sitemap rewrite rules for nginx

Need help with this?
Purchase All in One SEO Pack Pro to get dedicated support from us.

Buy Now

If you’re getting a 404 for your All in One SEO Pack Video sitemap on nginx, then please use the following rewrite rules in your config file (if you don’t know what to do with these, then you shouldn’t be using nginx in the first place):

These rules are for All in One SEO Pack Pro v3.1 and later only:

#rewrite rules for AIOSEOP Video Sitemap v3.1
rewrite ^/video-sitemap.xml$ /index.php?aiosp_sitemap_path=root last;
rewrite ^/video-sitemap.xml.gz$ /index.php?aiosp_sitemap_path=root last;
rewrite ^/(.+)-video-sitemap.xml$ /index.php?aiosp_sitemap_path=$1 last;
rewrite ^/(.+)-video-sitemap.xml.gz$ /index.php?aiosp_sitemap_path=$1 last;
rewrite ^/(.+)-video-sitemap(\d+).xml$ /index.php?aiosp_sitemap_path=$1&aiosp_sitemap_page=$2 last;
rewrite ^/(.+)-video-sitemap(\d+).xml.gz$ /index.php?aiosp_sitemap_path=$1&aiosp_sitemap_page=$2 last;

These rules are for All in One SEO Pack Pro v3.0.x and earlier only:

#rewrite rules for AIOSEOP Video Sitemap v3.0.x
rewrite ^/video-sitemap.xml$ /index.php?aiosp_sitemap_path=root last;
rewrite ^/video-sitemap.xml.gz$ /index.php?aiosp_sitemap_path=root.gz last;
rewrite ^/video-sitemap_(.+).xml$ /index.php?aiosp_sitemap_path=$1 last;
rewrite ^/video-sitemap_(.+).xml.gz$ /index.php?aiosp_sitemap_path=$1.gz last;
rewrite ^/video-sitemap_(.+)_(\d+).xml$ /index.php?aiosp_sitemap_path=$1&aiosp_sitemap_page=$2 last;
rewrite ^/video-sitemap_(.+)_(\d+).xml.gz$ /index.php?aiosp_sitemap_path=$1.gz&aiosp_sitemap_page=$2 last;

If this doesn’t work for you, then please contact us.

  • Was this helpful ?
  • YesNo
[i]
[i]
Skip to toolbar