Support

Admin Tools for WordPress

#30945 – if “sitemap.xml” is in htaccess “Files which will always be made accessible” it become inaccessible?

Posted in ‘Akeeba Admin Tools for WordPress’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Friday, 15 February 2019 17:47 CST
If I insert “sitemap.xml” in the htaccessMaker in the “Files which will always be made accessible” - It become inaccessible ? Weird....
 
Chacapamac
Saturday, 16 February 2019 04:00 CST
If there is a real file called sitemap.xml on your site what you're doing is enough. However, I don't think this is the case.

If there no real sitemap.xml file on your site but you are using XML Sitemap Generator for WordPress or a similar plugin you must NOT add sitemap.xml in the "Allow direct access to these files". The file sitemap.xml does not exist, it's a permalink. Permalinks are allowed without any further changes as long as their extension is allowed.

This brings us to the solution. You may have to add xml (lowercase) to "File extensions allowed". If xml is not in this list the Site Protection feature will block the request. The xml extension was added to that list in 1.0.0.rc1. Since you've been using the alpha versions you have the old list which does not include it. That explains why you have an issue.

Finally, there's another option. You can simply add the following to "Custom .htaccess rules at the top of the file":
RewriteCond %{REQUEST_URI} ^/sitemap\.xml$
RewriteRule . /index.php [L]

This tells Apache to have WordPress parse sitemap.xml as a permalink without bothering with the rest of the settings. This is the "nuclear option" and should not be required.


Nicholas K. Dionysopoulos

Lead Developer and Director



Greek: native

English: excellent

French: basic



Please keep in mind my timezone and cultural differences when reading my replies. Thank you!



nicholas
Saturday, 16 February 2019 11:40 CST
Thanks, Closed.
 
Chacapamac
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.

Cookies Notification - Action required

This website uses cookies to provide user authentication and improve your user experience. Please indicate whether you consent to our site placing these cookies on your device. You can change your preference later, from the controls which will be made available to you at the bottom of every page of our site.