XML Sitemap not loading
pawan-in opened this issue · 5 comments
I'm using AutoSitemap extension on my MediaWiki site but when I visit the sitemap I can see nothing but a white blank screen. I looked at the LocalSetting.php and everything is fine as per the installation instruction on the extension page and I added the following code in my .htacess as per this but still, the sitemap is not publicly visible.
<Files "sitemap.xsl">
Allow from all
</Files>
Thank you.
Hello.
Behavior of .htaccess
file really depends on its location.
sitemap.xsl
is not located in the root if your MW installation, but in extensions/AutoSitemap dir, so that's may be the case. Because the MW directory structure may be different on each installation, and also there are lots of different ways to serve php files (using Nginx, using Apache, etc), I haven't placed any particular instruction on extension description page. it'll just always be wrong,
Try <FilesMatch "sitemap\.xsl$">
instead of <Files "sitemap.xsl">
, it should allow to access sitemap.xsl
file not in the same directory there .htaccess
is located but also in all nested directories too, like extensions dir.
Thank you for replying dolfinus, You are right the .xsl file is located in the extensions/AutoSitemap dir so I changed the code in .htaccess to:
<FilesMatch "sitemap\.xsl$">
Allow from all
</FilesMatch>
but still no effect on visibility. Also, I tried visiting mysite.com/sitemap.xsl instead of redirecting to the main domain its returning with the following error.
The requested URL was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
P.S. there is nothing in the .htaccess for the redirect part.
Please place .htaccess
file to MW root directory and try again.
The .htaccess
file is already in the root directory. I also notice another behaviour after adding <FilesMatch "sitemap\.xsl$">
and that is when I visit mysite.com/sitemap.xsl it just download the sitemap.xsl file automatically.
Can you please provide a link to you site and specifically sitemap file URL?