I’m using the sitemap snippet (
http://modxcms.com/extras/package/410), and I have Friendly URLs enabled with aliases in use. In my site settings, I have a suffix of ".html" for my pages. My sitemap’s alias is simply "sitemap".
How can I override the .html extension for the sitemap so that it works as sitemap.xml? If I set the alias to "sitemap.xml", the manager removes the period upon saving, and I imagine that even if it didn’t remove the period, it would still apply the .html suffix, giving me a page at "sitemap.xml.html", which is not any better.
Thanks!
I'm learning more about MODx all the time and loving it.
Thanks, sharkbait! I have the plugin installed and set up, and it should work perfectly, but the only problem is that MODxs still keeps removing the period from my alias, so I can’t get a basename of "sitemap.xml". Any ideas?
Edit: For now, I just went to phpMyAdmin and set the alias in the database, and it works, but any time I edit and save the Sitemap resource, it’s going to mess it up again.
I'm learning more about MODx all the time and loving it.
Perfect! That was the problem. I’m not even using TransAlias, so I just disabled it.
It’s all working how I need it now. Thanks for the help.
I'm learning more about MODx all the time and loving it.
Haha, well you’re welcome then.
By the way, I found that when I override with basename, the seoOverride option to rewrite categories as folders was causes an infinite rewrite loop for resources that aren’t actually categories but don’t have a period in their alias. So before I got the period to stay, my alias was "sitemapxml", and it’s not a category, but I was overwriting with the basename, so if I tried to go to "modx2/sitemapxml" (modx2 is the subfolder on the site while I develop the new site design) in the browser, the seoOverride plugin would keep trying to redirect it or something, and the Firefox told me there were too many redirects. Perhaps I could report that to JIRA or something?
I'm learning more about MODx all the time and loving it.
That’s all right. I’m not even sure exactly what was happening. If it becomes a problem sometime, maybe I’ll give it some more thought, but I just turned it off since I don’t need it either.
I'm learning more about MODx all the time and loving it.