I am recieving Simple SiteMap 404 Error After Editing and Upload

Hello,
when checking the http://winegeographic.com/sitemap.xml

I receive

404 Error - Page Not Found
We could not find the page you were looking for. Try searching for it:

# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
RewriteRule ^(.*/)?sitemap.xml wp-content/sitemap.php [L]
# END WordPress

  • aristath
    • Recruit

    Hello there @digitald, I hope you're well today!

    Are you sure your site uses apache?
    From what I can tell it's using nginx instead... so .htaccess files do not apply in your case.
    As mentioned in the plugin's usage page, if you're using nginx you should use this rewrite rule instead in your nginx configuration file:
    rewrite ^/(.*/)?sitemap.xml /wp-content/sitemap.php last;

    I hope that helps!

    Cheers,
    Ari.

  • digitald
    • WPMU DEV Initiate

    Spoke with WPEngine and they run Nginx first and then Apache. They seem to be confused as to where the code should be inserted as well. Also, the mentioned that the structure of the .htaccess may be out of date according to wpengine

    Seemed to be Fixed: Solution:

    Had to Add the #uploaded tag and the first rule from the directions for Apache into the .htaccess file:

    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteRule ^(.*/)?sitemap.xml wp-content/sitemap.php [L]

    `
    If you look at our pasted .htaccess you will see we didn't have the #uploaded files section and we didn't have the first rule directly underneath.

    We ctrl-c and ctrl-v the snippet above and it worked and google verified the sitemap.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.