This simple PHP script is meant to help you easily create XML Sitemaps for static files, for instance PDFs.
- Copy
xml-sitemap-config-sample.ini
toxml-sitemap-config.ini
. - Configure the settings.
- Check the output of the xml-sitemap script and if it's ok, add the script URL to Google Webmaster Tools.
Because Google doesn't use them, and at that point outputting them is more work than it's worth. If you want to set them though, you can.
You can put it wherever you want except that it has to come from the same domain. I'd suggest just keeping it with the script.
Yes, absolutely. Set the directory
to uploads
and make sure recursive
is set to true
and it'd generate a nice XML
sitemap for all your PDFs.
Absolutely, on this project's GitHub.
This script is licensed under the GPL v3.
-
2022-12-06:
- Changed the whole script to be a single class to avoid namespace clashes and modernize the code.
- Switched from
config.php
to axml-sitemap-config.ini
file that can also be stored one directory above the script. - Fixed a series of bugs with recursive directory listings etc.
-
2013-09-22:
- Some small bugfixes to the script.
- Added license to readme.
-
2012-09-29:
- Move configuration to config.php.
- Fix URL output.
- Add option to work recursively.