注意:
All in One SEO バージョン 4.2.1 以降を実行している場合、リライトルールは不要になりました。
NGINX の一部の設定では、NGINX 設定ファイルに書き換えルールを追加する必要があります。
NGINXでXMLサイトマップ、RSSサイトマップ、または動画サイトマップの404ページが見つかりませんでしたというエラーが表示される場合は、NGINXの設定ファイルに以下のリライトルールを追加してください。
注意: これらの操作方法がわからない場合は、ホスティング会社にサポートを依頼する必要があります。
rewrite ^/video-sitemap.xml$ /index.php?aiosp_video_sitemap_path=root last; rewrite ^/video-sitemap.xml.gz$ /index.php?aiosp_video_sitemap_path=root last; rewrite ^/(.+)-video-sitemap.xml$ /index.php?aiosp_video_sitemap_path=$1 last; rewrite ^/(.+)-video-sitemap.xml.gz$ /index.php?aiosp_video_sitemap_path=$1 last; rewrite ^/(.+)-video-sitemap(\d+).xml$ /index.php?aiosp_video_sitemap_path=$1&aiosp_sitemap_page=$2 last; rewrite ^/(.+)-video-sitemap(\d+).xml.gz$ /index.php?aiosp_video_sitemap_path=$1&aiosp_sitemap_page=$2 last; rewrite ^/sitemap.xml$ /index.php?aiosp_sitemap_path=root last; rewrite ^/sitemap.xml.gz$ /index.php?aiosp_sitemap_path=root last; rewrite ^/(.+)-sitemap.xml$ /index.php?aiosp_sitemap_path=$1 last; rewrite ^/(.+)-sitemap.xml.gz$ /index.php?aiosp_sitemap_path=$1 last; rewrite ^/(.+)-sitemap(\d+).xml$ /index.php?aiosp_sitemap_path=$1&aiosp_sitemap_page=$2 last; rewrite ^/(.+)-sitemap(\d+).xml.gz$ /index.php?aiosp_sitemap_path=$1&aiosp_sitemap_page=$2 last; rewrite ^/sitemap.rss$ /index.php?aiosp_sitemap_path=rss last; rewrite ^/sitemap.latest.rss$ /index.php?aiosp_sitemap_path=rss_latest last;
注意: 動画サイトマップのルールは、常に XML サイトマップのルールの前に置く必要があります。
/sitemap.xml が競合するSEOプラグインのサイトマップのスラッグである /sitemap_index.xml にリダイレクトされ続ける場合にも、これらのリライトルールを使用する必要があるかもしれません。また、その特定のプラグインのリライトルールを削除する必要もあります。
これらのルールはユーザーの99%で機能します。WordPressがサブディレクトリにインストールされている場合など、一部のケースでは、変更が必要になる場合があります。
これでうまくいかない場合は、お問い合わせください。