By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
Sign In
Rakyatnesia.com
Notification Show More
Latest News
Forum Prediksi Taiwan 24 Maret 2023, Malam Hari Ini 2
Forum Prediksi Taiwan 24 Maret 2023, Malam Hari Ini
Bisnis
Forum Prediksi Cambodia 24 Maret 2023, Malam Hari Ini 4
Forum Prediksi Cambodia 24 Maret 2023, Malam Hari Ini
Bisnis
Syair togel
Forum Prediksi HK 24 Maret 2023, Malam Hari Ini
Bisnis
Forum Prediksi SDY 24 Maret 2023, Malam Hari Ini 6
Forum Prediksi SDY 24 Maret 2023, Malam Hari Ini
Bisnis
Forum Prediksi Macau 24 Maret 2023, Malam Hari Ini 8
Forum Prediksi Macau 24 Maret 2023, Malam Hari Ini
Bisnis
Aa
  • Home
  • Nasional
    • Pendidikan
  • Berita Jatim
    • Berita Bojonegoro
    • Berita Lamongan
    • Berita Tuban
  • Olahraga
    • Sepak Bola
    • Jadwal Bola
    • MotoGP
  • Prediksi Bola
    • Syair Cambodia
    • Syair taiwan
    • Syair Macau
    • Syair SDY
    • Syair SGP
    • Syair HK
  • Tekno
Reading: Konfigurasi Nginx untuk sitemap WordPress
Share
Rakyatnesia.com
Aa
Search
  • Home
  • Nasional
    • Pendidikan
  • Berita Jatim
    • Berita Bojonegoro
    • Berita Lamongan
    • Berita Tuban
  • Olahraga
    • Sepak Bola
    • Jadwal Bola
    • MotoGP
  • Prediksi Bola
    • Syair Cambodia
    • Syair taiwan
    • Syair Macau
    • Syair SDY
    • Syair SGP
    • Syair HK
  • Tekno
Have an existing account? Sign In
Follow US
© 2022 Foxiz News Network. Ruby Design Company. All Rights Reserved.
Rakyatnesia.com > Tekno > IoT > Konfigurasi Nginx untuk sitemap WordPress
IoT

Konfigurasi Nginx untuk sitemap WordPress

Last updated: 2023/02/05 at 2:12 PM
moch akbar fitrianto
Share
Konfigurasi Nginx untuk sitemap WordPress 9
SHARE

Ada pertanyaan yang masuk soal Sitemap di WordPress yang dibuat secara otomatis lewat plugin tidak ditemukan (404 Not Found) pada situs yang dihosting menggunakan Nginx. Jadi kasus ini paling sering terjadi pada website yang baru dimigrasikan dari shared hosting ke VPS dan si pemilik belum seberapa paham perbedaannya. Ya salah satunya tidak ada dukungan .htaccess yang menyebabkan masalah diatas karena biasanya sudah otomatis disettingkan pluginnya.

Setidaknya saya mendapatkan pertanyaan untuk 2 jenis plugin populer, yang satu memang khusus untuk pembuatan sitemap.xml dan yang satunya adalah plugin SEO paling terkenal.

Yang perlu dilakukan adalah mengedit konfigurasi virtual host Nginx, saya maksudkan adalah yang untuk website anda. Jadi bukan yang untuk setting Nginxnya sendiri. Kemudian tambahkan kode berikut dalam blok location / {}

  • Google XML Sitemaps
    rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?\.xml$ "/index.php?xml_sitemap=params=$2" last;
    rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?\.xml\.gz$ "/index.php?xml_sitemap=params=$2;zip=true" last;
    rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?\.html$ "/index.php?xml_sitemap=params=$2;html=true" last;
    rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?\.html.gz$ "/index.php?xml_sitemap=params=$2;html=true;zip=true" last;
  • Yoast SEO
    rewrite ^/sitemap_index.xml$ /index.php?sitemap=1 last;
    rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;

    atau menambahkan blok location sendiri:

    location ~ ([^/]*)sitemap(.*).x(m|s)l$ {
      	 rewrite ^/sitemap.xml$ /sitemap_index.xml permanent;
             rewrite ^/([a-z]+)?-?sitemap.xsl$ /index.php?xsl=$1 last;
      	 rewrite ^/sitemap_index.xml$ /index.php?sitemap=1 last;
      	 rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;}

Setelah itu restart Nginx dan tes kembali link sitemapnya. Seharusnya akan dapat diakses dengan normal.

Jangan Lupa Dibaca

Mengenal perintah – perintah Nginx

Mencegah file hidden Linux diakses lewat Nginx

Menampilkan seluruh user dan group pada Linux

Mengaktifkan Passive Mode di vsftpd

Menggantikan firewalld dengan iptables pada CentOS 7

TAGGED: blogging, managed vps, Server, vps, wordpress
Share this Article
Facebook Twitter Whatsapp Whatsapp Copy Link Print
Share
By moch akbar fitrianto
Follow:
Adalah Seorang penulis berita Teknologi dan juga Olahraga Khususnya Sepak bola dan MotoGP
POlres Bojonegoro
Sudawam
Polres
Polres
Polres
Polres
Polres
Polres

Artikel Terbaru

Forum Prediksi Taiwan 24 Maret 2023, Malam Hari Ini 11
Forum Prediksi Taiwan 24 Maret 2023, Malam Hari Ini
Bisnis
Forum Prediksi Cambodia 24 Maret 2023, Malam Hari Ini 13
Forum Prediksi Cambodia 24 Maret 2023, Malam Hari Ini
Bisnis
Syair togel
Forum Prediksi HK 24 Maret 2023, Malam Hari Ini
Bisnis
Forum Prediksi SDY 24 Maret 2023, Malam Hari Ini 15
Forum Prediksi SDY 24 Maret 2023, Malam Hari Ini
Bisnis
Forum Prediksi Macau 24 Maret 2023, Malam Hari Ini 17
Forum Prediksi Macau 24 Maret 2023, Malam Hari Ini
Bisnis
Panduan Lengkap Download Video Instagram Online, Dengan Mudah 19
Panduan Lengkap Download Video Instagram Online, Dengan Mudah
Tekno
Prediksi San Marino VS Irlandia Utara, 24 Maret 2023 21
Prediksi San Marino VS Irlandia Utara, 24 Maret 2023
Prediksi Bola
Prediksi Portugal VS Liechtenstein, 24 Maret 2023 23
Prediksi Portugal VS Liechtenstein, 24 Maret 2023
Prediksi Bola
//

We influence 20 million users and is the number one business and technology news network on the planet

Sign Up for Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

[mc4wp_form id=”847″]

Rakyatnesia.com
Follow US

© 2023 Rakyatnesia News Network. Ruby Design Company. All Rights Reserved.

Removed from reading list

Undo
Welcome Back!

Sign in to your account

Lost your password?