Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
693 views
in Plugins by
I have generated site from the url. It is generating, but if i see in root directory it is not creating.

Can we change the sitemap.xml file to other file name because i already have a sitemap.xml file.

1 Answer

0 votes
by

The q2a sitemap is not saved on the file system but is generated on the fly when you request it  ( http://www.yourq2asite.com/sitemap.xml ).

It's dinamically generated by the xml-sitemap-plugin, that is a q2a standard plugin.

If you want to change for some reason (that I've not understood. Do you want to use 2 sitemap.xml ?) the url at which this plugin "listens" for the request, you should change the behaviour of the plugin.

See this line :

https://github.com/q2a/question2answer/blob/8274a6e876c3682e878febfb02080a2291f7612e/qa-plugin/xml-sitemap/qa-xml-sitemap.php#L146

you could change it for instance

from 

return ($request=='sitemap.xml');

to

return ($request=='yournewlocation/sitemap.xml');

so that you can now invoke the plugin at the new url :

http://www.yourq2asite.com/yournewlocation/sitemap.xml 

...